Skip to content

Commit

Permalink
.cirrus.yum: retry yum if failed
Browse files Browse the repository at this point in the history
Add a sleep + retry loop in case yum install has failed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Aug 13, 2021
1 parent 74b5c34 commit f0dbefa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .cirrus.yml
Expand Up @@ -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
Expand Down

0 comments on commit f0dbefa

Please sign in to comment.