Microsoft Azure pipeline integration

How to use Codefresh pipelines with Azure

Codefresh has native support for Azure in the following areas:

IMPORTANT
The name assigned to the integration must be unique within the account. Using the same name for other integrations or Shared Configuration contexts within pipelines will result in conflicts.
For troubleshooting, see Error: context already exists.

Using Azure Git repositories

Codefresh can easily check out code from Azure Git repositories:

Azure Git integration

Azure Git integration

For more details see the documentation page. Once your repository is connected, you can use the native clone step as well as Git triggers like all other git providers.

Using Azure Docker registries

Azure Docker registries are fully compliant with the Docker registry API that Codefresh follows. You can connect an Azure Registry like any other Docker registry.

Adding the Azure Docker registry

Adding the Azure Docker registry

Once the registry is added you can the standard push step step in pipelines.

Deploying to Azure Kubernetes

Codefresh has native support for connecting an Azure cluster in the cluster configuration screen.

Connecting an Azure cluster

Connecting an Azure cluster

Once the cluster is connected you can use any of the available deployment options for Kubernetes clusters. You also get access to all other Kubernetes dashboards such as the cluster dashboard or the environment dashboard .

Storing test reports in Azure storage

Codefresh has native support for storing test reports in different storage buckets, including Azure Blob/File storage. You can connect your Azure storage account to Codefresh through the Cloud Storage options in Pipeline Integrations.

Azure cloud storage

Azure cloud storage

For detailed instructions, to set up an integration with your S3 storage account in Amazon in Codefresh, see Cloud storage integrations for pipelines, and to create and store test reports through Codefresh pipelines, see Creating test reports.

Using Azure storage for storing Helm charts

You can connect Azure Storage as a Helm repository in the integrations screen.

Using Azure for Helm charts

Using Azure for Helm charts

Once you connect your Helm repository you can use it any Codefresh pipeline with the Helm step.

Azure Single Sign-on

You can use Azure Active Directory as an SSO mechanism in Codefresh.

Azure SSO integration

Azure SSO integration

Once configuration is complete all Codefresh users can login using their Azure credentials instead of personal accounts.

Traditional Azure deployments

For any other Azure deployment you can use the Azure CLI from a Docker image in a freestyle step.

YAML

  create_my_vm:
    title: Creating a VM
    image: mcr.microsoft.com/azure-cli
    commands:
      - az vm create --resource-group TutorialResources --name TutorialVM1 --image UbuntuLTS --generate-ssh-keys     

For authentication see the Microsoft documentation page.

Manage your Kubernetes cluster
Cloning Git repositories