mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
test:[skip e2e]fix get image tag (#32306)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
9248a6a149
commit
520a302f3a
@ -43,11 +43,14 @@ def get_image_tag_by_short_name(repository, tag, arch):
|
||||
res = []
|
||||
# Iterate through all tags and find the ones with the same DIGEST
|
||||
for tag_info in data["results"]:
|
||||
if "digest" in tag_info["images"][0] and tag_info["images"][0]["digest"] == digest:
|
||||
# Extract the image name
|
||||
image_name = tag_info["name"].split(":")[0]
|
||||
if image_name != tag and arch in [x["architecture"] for x in tag_info["images"]]:
|
||||
res.append(image_name)
|
||||
try:
|
||||
if "digest" in tag_info["images"][0] and tag_info["images"][0]["digest"] == digest:
|
||||
# Extract the image name
|
||||
image_name = tag_info["name"].split(":")[0]
|
||||
if image_name != tag and arch in [x["architecture"] for x in tag_info["images"]]:
|
||||
res.append(image_name)
|
||||
except Exception as e:
|
||||
continue
|
||||
# In case of no match, try to find the latest tag with the same arch
|
||||
# there is a case: push master-xxx-arm64 and master-latest, but master-latest-amd64 is not pushed,
|
||||
# then there will be no tag matched, so we need to find the latest tag with the same arch even it is not the latest tag
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user