From 83754c3eefdff3b76503afc1d3671222fccc465f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 17 Feb 2021 16:31:59 +0000 Subject: [PATCH] [CI] install docker-compose with retry (#24069) (#24083) --- .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 a430eb1873f..b28bbf32500 100755 --- a/.ci/scripts/install-docker-compose.sh +++ b/.ci/scripts/install-docker-compose.sh @@ -9,5 +9,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