File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,23 @@ function get_bundle_for_version() {
58
58
bundle=" ${registry_prefix_quay}${app_version} /serverless-bundle"
59
59
60
60
image=$( image_with_sha " ${bundle} :latest" )
61
+ image_version=$( bundle_image_version " ${bundle} :latest" )
62
+
61
63
# As a backup, try also CI registry. This it temporary until the previous version gets to Konflux.
62
- if [[ " ${image} " == " " ]]; then
64
+ # For .micro releases, it's possible we only have the _previous_ version in Konflux, so also check the version of the bundle
65
+ if [[ " ${image} " == " " || " ${image_version} " != " ${version} " ]]; then
63
66
image=$( image_with_sha " registry.ci.openshift.org/knative/serverless-bundle:release-${version} " )
67
+ image_version=$( bundle_image_version " registry.ci.openshift.org/knative/serverless-bundle:release-${version} " )
64
68
fi
65
69
66
70
if [[ " ${image} " == " " ]]; then
67
71
exit 1
68
72
fi
69
73
74
+ if [[ " ${image_version} " != " ${version} " ]]; then
75
+ exit 2
76
+ fi
77
+
70
78
echo " $image "
71
79
}
72
80
@@ -330,6 +338,12 @@ function image_with_sha {
330
338
echo " ${image_without_tag} @${digest} "
331
339
}
332
340
341
+ function bundle_image_version {
342
+ image=${1:? " Provide image" }
343
+ version=$( skopeo inspect --no-tags=true " docker://${image} " | jq -r ' .Labels.version' )
344
+ echo " ${version} "
345
+ }
346
+
333
347
function get_app_version_from_tag() {
334
348
local tag app_version
335
349
tag=${1:? " Provide tag for Serving images" }
You can’t perform that action at this time.
0 commit comments