A cloud builder is a container image packaged to run a specific build or deployment tool within a Cloud Build pipeline. Each cloudbuild.yaml step names a builder image and supplies its attributes; Cloud Build executes the step as a container. section 12.4.3
Cloud builders support several pipeline responsibilities:
- Run tools such as Docker, Git, or kubectl. section 12.4.3
- Build and push container images to a registry. section 12.4.3
- Deploy images to GKE, Cloud Run, or Cloud Run on Anthos. section 12.4.3
- Use Google-supported, community-supported, or custom-developed images. section 12.4.3
Build, push, and deploy
A pipeline can run tests, invoke gcr.io/cloud-builders/docker to build and push an image, then invoke gcr.io/cloud-builders/kubectl to deploy it. section 12.4.3
# cloudbuild.yaml steps: # This step runs the unit tests on the app - name: 'python:3.7-slim' id: Test ... # This step builds the container image. - name: 'gcr.io/cloud-builders/docker' id: Build ... # This step pushes the image to a container registry - name: 'gcr.io/cloud-builders/docker' id: Push ... # This step deploys the new version of our container image - name: 'gcr.io/cloud-builders/kubectl' id: Deploy
Use the configuration listing to inspect how named builder images represent test, build, push, and deployment steps. section 12.4.3
