Skip to content
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

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member

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"`

fi
tc_end_block "Tag docker image as latest-build"


Expand Down