From 465750c91d4ee476a1b2954c5bb7b81bea90ed58 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 17 Feb 2021 09:45:55 +0000 Subject: [PATCH] [CI] install docker-compose with retry (#24069) --- .ci/scripts/install-docker-compose.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.ci/scripts/install-docker-compose.sh b/.ci/scripts/install-docker-compose.sh index 72d889f216af..bfc7ba17629a 100755 --- a/.ci/scripts/install-docker-compose.sh +++ b/.ci/scripts/install-docker-compose.sh @@ -23,5 +23,12 @@ DC_CMD="${HOME}/bin/docker-compose" mkdir -p "${HOME}/bin" -curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -chmod +x "${DC_CMD}" +if curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" ; then + chmod +x "${DC_CMD}" +else + echo "Something bad with the download, let's delete the corrupted binary" + if [ -e "${DC_CMD}" ] ; then + rm "${DC_CMD}" + fi + exit 1 +fi