From 894fb343d615558332dc8f2ba3131a227df2940f Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Tue, 5 Nov 2024 17:08:51 +0300 Subject: [PATCH] feat: image digest --- charts/cf-runtime/.ci/image-digests.sh | 2 +- scripts/update_values_with_digests.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/cf-runtime/.ci/image-digests.sh b/charts/cf-runtime/.ci/image-digests.sh index 2bec2de2..e4dd3dc9 100755 --- a/charts/cf-runtime/.ci/image-digests.sh +++ b/charts/cf-runtime/.ci/image-digests.sh @@ -9,6 +9,6 @@ docker run \ -u $(id -u) \ --rm \ --entrypoint /bin/sh \ - regclient/regctl:v0.7.2-alpine \ + quay.io/codefresh/codefresh-shell:0.0.20 \ -c \ cd /venona && ./scripts/update_values_with_digests.sh \ No newline at end of file diff --git a/scripts/update_values_with_digests.sh b/scripts/update_values_with_digests.sh index 17f938db..4d9933cc 100755 --- a/scripts/update_values_with_digests.sh +++ b/scripts/update_values_with_digests.sh @@ -9,12 +9,12 @@ runtime_images=$(yq e '.runtime.engine.runtimeImages' $VALUES_FILE) while read -r line; do key=${line%%:*} - image=${line#*:} + full_image=${line#*: } + image=${full_image%%@*} digest=$(regctl manifest digest $image) - yq e -i ".runtime.engine.runtimeImages.$key |= . + \"@$digest\"" $VALUES_FILE + yq e -i ".runtime.engine.runtimeImages.$key = \"$image@$digest\"" $VALUES_FILE done <<< "$runtime_images" - get_image_digest() { local registry=$1 local repository=$2