Skip to content

Commit 6d0d410

Browse files
committed
NO-ISSUE: chore(GHA): add skopeo retry in case it fails first time
1 parent 74402f0 commit 6d0d410

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

ci/check-params-env.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ PARAMS_ENV_PATH="manifests/base/params.env"
2727
# images we want to have in the `params.env` file.
2828
EXPECTED_NUM_RECORDS=24
2929

30+
# Number of attempts for the skopeo tool to gather data from the repository.
31+
SKOPEO_RETRY=3
32+
3033
# Size change tresholds:
3134
# Max percentual change
3235
SIZE_PERCENTUAL_TRESHOLD=10
@@ -324,7 +327,7 @@ function check_image() {
324327
local image_commitref
325328
local image_created
326329

327-
image_metadata_config="$(skopeo inspect --config "docker://${image_url}")" || {
330+
image_metadata_config="$(skopeo inspect --retry-times "${SKOPEO_RETRY}" --config "docker://${image_url}")" || {
328331
echo "Couldn't download image config metadata with skopeo tool!"
329332
return 1
330333
}
@@ -366,7 +369,7 @@ function check_image() {
366369
local image_size
367370
local image_size_mb
368371

369-
image_metadata="$(skopeo inspect --raw "docker://${image_url}")" || {
372+
image_metadata="$(skopeo inspect --retry-times "${SKOPEO_RETRY}" --raw "docker://${image_url}")" || {
370373
echo "Couldn't download image metadata with skopeo tool!"
371374
return 1
372375
}

ci/check-runtime-images.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
# Expected commit reference for the runtime images
2222
EXPECTED_COMMIT_REF="2024b"
2323

24+
# Number of attempts for the skopeo tool to gather data from the repository.
25+
SKOPEO_RETRY=3
26+
2427
# Size change tresholds:
2528
# Max percentual change
2629
SIZE_PERCENTUAL_TRESHOLD=10
@@ -104,7 +107,7 @@ function check_image() {
104107
}
105108
echo "Image URL: '${img_url}'"
106109

107-
img_metadata_config="$(skopeo inspect --config "docker://${img_url}")" || {
110+
img_metadata_config="$(skopeo inspect --retry-times "${SKOPEO_RETRY}" --config "docker://${img_url}")" || {
108111
echo "ERROR: Couldn't download '${img_url}' image config metadata with skopeo tool!"
109112
return 1
110113
}
@@ -143,7 +146,7 @@ function check_image() {
143146
local img_size
144147
local img_size_mb
145148

146-
img_metadata="$(skopeo inspect --raw "docker://${img_url}")" || {
149+
img_metadata="$(skopeo inspect --retry-times "${SKOPEO_RETRY}" --raw "docker://${img_url}")" || {
147150
echo "ERROR: Couldn't download '${img_url}' image metadata with skopeo tool!"
148151
return 1
149152
}

0 commit comments

Comments
 (0)