Skip to content

Commit

Permalink
ceph-build-config.sh: filter out deleted tags
Browse files Browse the repository at this point in the history
Deleted tags still show up in the REST API.  They have a non-null
end_ts field.  Since those images can't be pulled, they should not
be listed as currently available, and should not affect the search
for the latest available tag when checking from the build.

Signed-off-by: Dan Mick <[email protected]>
  • Loading branch information
Dan Mick authored and dmick committed Sep 27, 2024
1 parent 10ac2e4 commit ffa9970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/ceph-build-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function get_tags_matching () {
while response="$(curl --silent --fail --list-only --location \
"${tag_list_url}&page=${page}")"; do
local matching_tags ; matching_tags="$(echo "${response}" | \
jq -r ".tags[] | select(.name | match(\"${version_tag}\")) | .name")"
jq -r ".tags[] | select(.end_ts == null) | select(.name | match(\"${version_tag}\")) | .name")"
# jq: From the results of the curl, select all images with a name matching the matcher, and then
# output the name. Exits success w/ empty string if no matches found.
if [ -n "${matching_tags}" ]; then
Expand Down

0 comments on commit ffa9970

Please sign in to comment.