Skip to main content

Build and Push to GCR

This topic explains how to add a Build and Push to Google Container Registry (GCR) 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 GCR 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. For example, you can set up a Kubernetes cluster build infrastructure.
  4. In the Build stage's Execution tab, select Add Step, select Add Step again, and then select Build and Push to GCR from the Step Library.
  5. Configure the Build and Push to GCR step settings.
  6. 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 GCR step logs.

If the build succeeds, you can find your pushed image on GCR.

See also