Skip to main content

Build and Push to ACR

This topic explains how to add a Build and Push to Azure Container Registry (ACR) step to a CI pipeline.

These steps assume you're familiar with creating CI pipelines. If you haven't created a pipeline before, try this tutorial to get started for free with the fastest CI on the planet.

Add the Build and Push to ACR step

  1. Go to Pipelines and create a new pipeline or edit an existing pipeline.
  2. If your pipeline doesn't already have a Build stage, select Add Stage, and then select Build.
  3. On the Build stage's Infrastructure tab, configure the build infrastructure.
note

The Build and Push to ACR step is only available for Kubernetes cluster build infrastructure. For other build infrastructures, you can use the Build and Push and image to Docker Registry step to build and push an artifact to ACR.

  1. In the Build stage's Execution tab, select Add Step, select Add Step again, and then select Build and Push to ACR from the Step Library.
  2. Configure the Build and Push to ACR step settings.
  3. Select Apply Changes to save the step, and then select Save to save the pipeline.

Run the pipeline

Select Run Pipeline to run your pipeline. Depending on your pipeline's codebase configuration, you may need to select a Git branch or tag to use for the build.

While the build runs, you can monitor the Build and Push to ACR step logs, and, if the build succeeds, you can find your pushed image on ACR.

See also