I am successfully using Google Cloud Build to build my app into a container upon a push to the master branch, and store that built container in Google Cloud Registry.
I'm trying to simplify my setup, so have removed the cloudbuild.yaml in favor of Cloud Build's "auto detect docker" feature.
The container still gets built, but the difference is that the built image is not tagged as latest
. latest
is still assigned to an older build that had been done while the cloudbuild.yaml
was still present.
How can I make it so that each new container build gets tagged as latest
without using cloudbuild.yaml
?
The answer is yes, here's how:
$COMMIT_SHA
at the end with latest
Run the trigger and you should see that your most recent container build is tagged with latest
.