mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build(): retries for travis deploying (#7146)
* Now re-runs the given deploy mode a second time if failed the first time. This ensure that deployment works fine most of the time and should also avoid conflicts between different Travis CI jobs that are deplyoing at the same time.
This commit is contained in:
committed by
Andrew Seguin
parent
d858ad93ec
commit
606178be0a
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Load the retry-call utility function.
|
||||
source ./scripts/ci/sources/retry-call.sh
|
||||
source ./scripts/retry-call.sh
|
||||
|
||||
# Variable the specifies how often the wait script should be invoked if it fails.
|
||||
WAIT_RETRIES=2
|
||||
|
||||
@@ -9,6 +9,9 @@ set -e
|
||||
# Go to the project root directory
|
||||
cd $(dirname $0)/../..
|
||||
|
||||
# Load the retry-call utility function.
|
||||
source scripts/retry-call.sh
|
||||
|
||||
# If the current Travis job is triggered by a pull request skip the deployment.
|
||||
# This check is necessary because Travis still tries to run the deploy build-stage for
|
||||
# pull requests.
|
||||
@@ -17,22 +20,25 @@ if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# Variable the specifies how often the deploy script should be invoked if it fails.
|
||||
DEPLOY_RETRIES=1
|
||||
|
||||
echo ""
|
||||
echo "Starting the deployment script. Running mode: ${DEPLOY_MODE}"
|
||||
echo ""
|
||||
|
||||
if [[ "${DEPLOY_MODE}" == "build-artifacts" ]]; then
|
||||
./scripts/deploy/publish-build-artifacts.sh
|
||||
retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh
|
||||
fi
|
||||
|
||||
if [[ "${DEPLOY_MODE}" == "docs-content" ]]; then
|
||||
./scripts/deploy/publish-docs-content.sh
|
||||
retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh
|
||||
fi
|
||||
|
||||
if [[ "${DEPLOY_MODE}" == "screenshot-tool" ]]; then
|
||||
./scripts/deploy/deploy-screenshot-tool.sh
|
||||
retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-screenshot-tool.sh
|
||||
fi
|
||||
|
||||
if [[ "${DEPLOY_MODE}" == "dashboard" ]]; then
|
||||
./scripts/deploy/deploy-dashboard.sh
|
||||
retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh
|
||||
fi
|
||||
|
||||
Executable → Regular
Reference in New Issue
Block a user