2018-12-18 02:08:53 +01:00
|
|
|
#!/usr/bin/env bash
|
2015-10-15 01:47:42 +02:00
|
|
|
set -e
|
|
|
|
set -x
|
2017-01-14 11:19:26 +01:00
|
|
|
|
2017-06-06 03:15:17 +02:00
|
|
|
# This is just a thin wrapper around provision.
|
2017-06-13 22:00:11 +02:00
|
|
|
# Provisioning may fail due to many issues but most of the times a network
|
|
|
|
# connection issue is the reason. So we are going to retry entire provisioning
|
|
|
|
# once again if that fixes our problem.
|
2021-03-29 20:51:40 +02:00
|
|
|
tools/provision "$@" || {
|
2019-07-19 03:36:59 +02:00
|
|
|
ret=$?
|
|
|
|
if [ "$ret" = 1 ]; then
|
|
|
|
echo "\`provision\`: Something went wrong with the provisioning, might be a network issue, Retrying to provision..."
|
|
|
|
tools/provision
|
|
|
|
else
|
|
|
|
echo "\`provision\`: Something REALLY BAD went wrong with the provisioning, not retrying."
|
|
|
|
exit "$ret"
|
|
|
|
fi
|
|
|
|
}
|