From e618a6d5ee1266b1734ac0327566922fc1b48ddb Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 4 Mar 2021 15:37:59 -0800 Subject: [PATCH] curl: add --retry 5 Sometimes github gives up 5xx errors, for example: > panic: getImages error exit status 1 (output: curl: (22) The requested URL returned error: 502 > Failed to get https://github.com/docker-library/busybox/raw/dist-i386/stable/glibc/busybox.tar.xz This is unfortunate but temporary, and adding --retry should handle at least some cases, improving CI stability. Signed-off-by: Kir Kolyshkin --- .github/workflows/validate.yml | 2 +- tests/integration/get-images.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4d4cc75ce6a..02c59d38420 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -60,7 +60,7 @@ jobs: - name: install shellcheck run: | mkdir ~/bin - curl -sSfL $BASEURL/$VERSION/shellcheck-$VERSION.linux.x86_64.tar.xz | + curl -sSfL --retry 5 $BASEURL/$VERSION/shellcheck-$VERSION.linux.x86_64.tar.xz | tar xfJ - -C ~/bin --strip 1 shellcheck-$VERSION/shellcheck sha256sum ~/bin/shellcheck | grep -q $SHA256SUM # make sure to remove the old version diff --git a/tests/integration/get-images.sh b/tests/integration/get-images.sh index 4a5c92b4c14..9f1bf96add2 100755 --- a/tests/integration/get-images.sh +++ b/tests/integration/get-images.sh @@ -36,7 +36,7 @@ function get() { exit 1 fi - if ! curl -o "$dest" -fsSL "$url"; then + if ! curl -o "$dest" -fsSL --retry 5 "$url"; then echo "Failed to get $url" 1>&2 exit 1 fi