Retry package installation 3 times.
When setting up the CI environment, retry package installation 3 times before going up. Should help prevent spurious failures during infrastructure issues.
This commit is contained in:
parent
625f6bc398
commit
d03e245e03
|
@ -139,16 +139,29 @@ if [ "yes" = "$INSTALL_FIDO_PPA" ]; then
|
||||||
sudo apt-add-repository -y ppa:yubico/stable
|
sudo apt-add-repository -y ppa:yubico/stable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x" != "x$PACKAGES" ]; then
|
tries=3
|
||||||
|
while [ ! -z "$PACKAGES" ] && [ "$tries" -gt "0" ]; do
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
apt)
|
apt)
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -qy $PACKAGES
|
if sudo apt install -qy $PACKAGES; then
|
||||||
|
PACKAGES=""
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
setup)
|
setup)
|
||||||
/cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`
|
if /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`; then
|
||||||
|
PACKAGES=""
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
if [ ! -z "$PACKAGES" ]; then
|
||||||
|
sleep 90
|
||||||
|
fi
|
||||||
|
tries=$(($tries - 1))
|
||||||
|
done
|
||||||
|
if [ ! -z "$PACKAGES" ]; then
|
||||||
|
echo "Package installation failed."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
|
if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
|
||||||
|
|
Loading…
Reference in New Issue