diff --git a/ci/check-params-env.sh b/ci/check-params-env.sh index ba480e7b9..52d40d0cd 100755 --- a/ci/check-params-env.sh +++ b/ci/check-params-env.sh @@ -248,6 +248,7 @@ function check_image() { local image_name local image_commit_id local image_commitref + local image_created image_metadata="$(skopeo inspect --config "docker://${image_url}")" || { echo "Couldn't download image metadata with skopeo tool!" @@ -265,6 +266,10 @@ function check_image() { echo "Couldn't parse '.config.Labels."io.openshift.build.commit.ref"' from image metadata!" return 1 } + image_created=$(echo "${image_metadata}" | jq --raw-output '.created') || { + echo "Couldn't parse '.created' from image metadata!" + return 1 + } local config_env local build_name_raw @@ -289,6 +294,7 @@ function check_image() { } echo "Image name retrieved: '${image_name}'" + echo "Image created: '${image_created}'" check_image_variable_matches_name_and_commitref "${image_variable}" "${image_name}" "${image_commitref}" "${openshift_build_name}" || return 1 diff --git a/ci/check-runtime-images.sh b/ci/check-runtime-images.sh index 8908a9b6c..826ea2197 100755 --- a/ci/check-runtime-images.sh +++ b/ci/check-runtime-images.sh @@ -27,6 +27,7 @@ function check_image() { local img_tag local img_url local img_metadata + local img_created img_tag=$(jq -r '.metadata.tags[0]' "${runtime_image_file}") || { echo "ERROR: Couldn't parse image tags metadata for '${runtime_image_file}' runtime image file!" @@ -42,6 +43,11 @@ function check_image() { return 1 } + img_created=$(echo "${img_metadata}" | jq --raw-output '.created') || { + echo "Couldn't parse '.created' from image metadata!" + return 1 + } + local expected_string="runtime-${img_tag}-ubi" echo "Checking that '${expected_string}' is present in the image metadata" echo "${img_metadata}" | grep --quiet "${expected_string}" || { @@ -49,6 +55,8 @@ function check_image() { return 1 } + echo "Image created: '${img_created}'" + # TODO: we shall extend this check to check also Label "io.openshift.build.commit.ref" value (e.g. '2024a') or something similar }