Deploy to Cloud Run with Cloud Build cloudbuild.yaml Documentation

I was reading through documentation on how to create a cloudbuild.yaml flie for cloudbuild/cloudrun and I have a question about the cloudbuild.yaml config. It shows a build step of pushing the container image to the container registry but also shows the images field that pushes the resulting image to the container registry. What is the difference in these two actions? Is the build step of pushing the the image performed so we can have another build step that relies on it? If so, does that make the images field redundant?

0 1 717
1 REPLY 1

Hi @threespeaks ,

Based on these documentation:

The images field in the build config file specifies one or more Linux Docker images to be pushed by Cloud Build to Container Registry. You may have a build that performs tasks without producing any Linux Docker images, but if you build images and don't push them to the registry, the images are discarded on build completion. If a specified image is not produced during the build, the build will fail.

The documentation link above contains more information for Build Configuration that you may want to check out. 

Regards,
Marc