From f0dbefac61c73271d42c6d776188c98aac7e0a7a Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 12 Aug 2021 00:59:34 -0700 Subject: [PATCH] .cirrus.yum: retry yum if failed Add a sleep + retry loop in case yum install has failed. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8003221fbc1..26a579cfaea 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -96,7 +96,12 @@ task: yum config-manager --set-enabled powertools # for glibc-static ;; esac - yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu + # Work around dnf mirror failures by retrying a few times. + for i in $(seq 0 2); do + sleep $i + yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu && break + done + [ $? -eq 0 ] # fail if yum failed # install Go curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local # install bats