From e3de4030df037b42b4ae7a26aa03110882c1149e Mon Sep 17 00:00:00 2001 From: Thomas Ferreira de Lima Date: Tue, 18 Dec 2018 18:38:51 -0500 Subject: [PATCH] http://mirrors.fedoraproject.org is unreliable. Retry yum 5 times. --- ci-scripts/docker/docker_build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci-scripts/docker/docker_build.sh b/ci-scripts/docker/docker_build.sh index fd3cff7a2..235335161 100755 --- a/ci-scripts/docker/docker_build.sh +++ b/ci-scripts/docker/docker_build.sh @@ -14,7 +14,12 @@ fi echo PY_VERSION=$PY_VERSION echo DOCKER_IMAGE=$DOCKER_IMAGE -yum install -y zlib-devel ccache zip || exit 1 # sometimes the epel server is down. +# sometimes the epel server is down. retry 5 times +for i in $(seq 1 5); do + yum install -y zlib-devel ccache zip && s=0 && break || s=$? && sleep 15; +done + +[ $s -eq 0 ] || exit $s if [[ $DOCKER_IMAGE == "quay.io/pypa/manylinux1_x86_64" ]]; then ln -s /usr/bin/ccache /usr/lib64/ccache/c++