Windows Containers Support Overview (Beta)

Note: To learn more regarding how to participate in our beta release please contact sales

Codefresh pipeline has the option to support Windows based containers. If you’ve projects in your organisation like .NET Framework or are in transition from Windows to Linux based projects and still need to have CI\CD pipelines for Windows containers, you’ll now be able to achieve this by using Codefresh.

As part of the beta program Codefresh will supply you with an account which will be able to support Windows pipelines and a dedicated Windows Server version 1709 VM which Codefresh will host for you. Please keep in mind that this account will only be able to run Windows containers based pipelines, you’ll still have the full option to switch to your regular Codefresh account that supports Linux containers based pipelines.

Codefresh Windows pipeline supports the following Codefresh steps: Clone, Build, Push, Composition, Deploy and Freestyle. Please refer to our steps documentation to learn more about each of them.

Example

In this example we’ll perform the following steps:

  • Clone our git repository and build a .NET Framework image.

  • Run our dotnet unit tests and according to the results annotate the image accordingly.

  • Push to dockerhub if our tests have passed.

version: '1.0'
steps:
  
  BuildingDockerImage:
    title: Building Docker Image
    type: build
    image_name: codefresh/dotnetapp
    working_directory: ./samples/dotnetapp
    tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
    dockerfile: Dockerfile
 
  RunningUnitTests:
    title: Running Unit Tests
    image: '${{BuildingDockerImage}}'
    command: dotnet test
    on_success:
      metadata:
        set:
          - '${{BuildingDockerImage.imageId}}':
              - CF_QUALITY: true
              - repo_owner: '${{CF_REPO_OWNER}}'
              - repo_name: '${{CF_REPO_NAME}}'
              - branch_name: '${{CF_BRANCH}}'
              - commit_author: '${{CF_COMMIT_AUTHOR}}'
              - commit_url: '${{CF_COMMIT_URL}}'
              - commit_message: '${{CF_COMMIT_MESSAGE}}'
    on_fail:
      metadata:
        set:
          - '${{BuildingDockerImage.imageId}}':
              - CF_QUALITY: false
  
  PushingToDockerRegistry:
    title: Pushing to Docker Registry
    type: push
    candidate: '${{BuildingDockerImage}}'
    tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
    registry: dockerhub