From b629c862ea47f4cdbacec0fbc5c1a2852aa61c61 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Thu, 24 Jul 2025 12:07:15 +0100 Subject: [PATCH] [bindata] catch skopeo copy failures If skopeo copy failed (e.g quay.io wobbling) it would be silently ignored and result in missing image references --- hack/sync-bindata.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hack/sync-bindata.sh b/hack/sync-bindata.sh index af3358a586..87b6b74e0a 100755 --- a/hack/sync-bindata.sh +++ b/hack/sync-bindata.sh @@ -142,13 +142,21 @@ EOF_CAT } for BUNDLE in $(hack/pin-bundle-images.sh | tr "," " "); do - n=0 - until [ "$n" -ge 5 ]; do - skopeo copy "docker://$BUNDLE" dir:${EXTRACT_DIR}/tmp && break - echo "Command failed. retrying ... $n/5" - n=$((n+1)) - sleep 15 - done + ( + set +e + n=0 + RC=1 + while :; do + skopeo copy "docker://$BUNDLE" dir:${EXTRACT_DIR}/tmp + RC=$? + if [ $RC -eq 0 -o "$n" -ge 5 ]; then + exit $RC + fi + n=$((n+1)) + echo "Command failed. retrying ... $n/5" + sleep 15 + done + ) extract_bundle "${EXTRACT_DIR}/tmp" "${OUT_DATA}/" done