.cirrus.yum: retry yum if failed

Add a sleep + retry loop in case yum install has failed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-08-12 00:59:34 -07:00
parent 74b5c34e6e
commit f0dbefac61
+6 -1
View File
@@ -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