setup-production: Add a wrapper to retry provisioning when it fails.

In this commit we basically add a wrapper around provisioning
inside setup-production to trigger a retry in case of failure.
This commit is contained in:
Aditya Bansal
2017-06-14 01:24:52 +05:30
committed by Steve Howell
parent fab4a30cce
commit 924d8266c0

View File

@@ -21,7 +21,13 @@ sudo chmod a+rX /home/travis
# to conflicts over which version of postgres should be running.
sudo apt-get remove postgresql-9.2 postgresql-client-9.2 postgresql-contrib-9.2 postgresql-9.4 postgresql-client-9.4 postgresql-9.5 postgresql-contrib-9.5 postgresql-client-9.5 postgresql-9.6 postgresql-contrib-9.6 postgresql-client-9.6 -y
tools/provision --travis --production-travis
# 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.
if ! tools/provision --travis --production-travis; then
echo "\`provision\`: Something went wrong with the provisioning, might be a network issue, Retrying to provision..."
tools/provision --travis --production-travis
fi
cp -a tools/travis/success-http-headers.txt ~/
source tools/travis/activate-venv