tool/gocross: retry downloading Go three times
Occasionally CI jobs will flake because downloading from GitHub fails. Allow retrying up to 3 times to reduce CI flakiness. Updates #cleanup Change-Id: Ib019e89ac74b81d78f71a40099b20ff60014a81f Signed-off-by: Alex Chan <alexc@tailscale.com>
This commit is contained in:
@@ -75,7 +75,7 @@ case "$REV" in
|
|||||||
# Go uses the name "amd64".
|
# Go uses the name "amd64".
|
||||||
HOST_ARCH="amd64"
|
HOST_ARCH="amd64"
|
||||||
fi
|
fi
|
||||||
curl -f -L -o "$toolchain.tar.gz" "https://github.com/tailscale/go/releases/download/build-${REV}/${HOST_OS}-${HOST_ARCH}.tar.gz"
|
curl --retry 3 -f -L -o "$toolchain.tar.gz" "https://github.com/tailscale/go/releases/download/build-${REV}/${HOST_OS}-${HOST_ARCH}.tar.gz"
|
||||||
mkdir -p "$toolchain"
|
mkdir -p "$toolchain"
|
||||||
(cd "$toolchain" && tar --strip-components=1 -xf "$toolchain.tar.gz")
|
(cd "$toolchain" && tar --strip-components=1 -xf "$toolchain.tar.gz")
|
||||||
echo "$REV" >"$toolchain.extracted"
|
echo "$REV" >"$toolchain.extracted"
|
||||||
|
|||||||
Reference in New Issue
Block a user