-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: publish latest-master-build
docker image
#95444
Conversation
Previously, our automation published latest docker images using `latest-v2x.x-build` tag. External automation that tracked the master branch would need to update the tag, when we change the version. This PR adds an extra step to tag the master branch builds with `latest-master-build` docker tag. Epic: none Release note: None
@@ -55,6 +55,10 @@ if [[ -n "${release_branch}" ]] ; then | |||
log_into_gcloud | |||
gcloud container images add-tag "${gcr_repository}:${build_name}" "${gcr_repository}:latest-${release_branch}-build" | |||
fi | |||
if [[ "$TC_BUILD_BRANCH" == "master" ]]; then | |||
log_into_gcloud | |||
gcloud container images add-tag "${gcr_repository}:${build_name}" "${gcr_repository}:latest-master-build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we also need to remove the label from the previous push? There should always be at most one image with this tag, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, this push replaces all previously published tags with the same name. This is the same logic we use for latest-v23.1-build
tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. It's a property of container repositories that a given tag can be on only one image in a repository at a time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think I was regressing to this incantation which we had to use for updating the "latest" label after a new AMI was created,
gcloud compute images remove-labels $IMAGE --labels="latest"`
bors r=jlinder |
Build succeeded: |
Previously, our automation published latest docker images using
latest-v2x.x-build
tag. External automation that tracked the master branch would need to update the tag, when we change the version.This PR adds an extra step to tag the master branch builds with
latest-master-build
docker tag.Epic: none
Release note: None