@@ -12,13 +12,6 @@ cd $(dirname $0)/../..
1212# Load the retry-call utility function.
1313source scripts/retry-call.sh
1414
15- # If the current Travis job is triggered by a pull request skip the deployment.
16- # This check is necessary because Travis still tries to run the deploy build-stage for
17- # pull requests.
18- if [[ " $TRAVIS_PULL_REQUEST " != " false" ]]; then
19- echo " Build artifacts and docs content will only be deployed in Travis push builds."
20- exit 0;
21- fi
2215
2316# Variable the specifies how often the deploy script should be invoked if it fails.
2417DEPLOY_RETRIES=1
@@ -27,25 +20,12 @@ echo ""
2720echo " Starting the deployment script. Running mode: ${DEPLOY_MODE} "
2821echo " "
2922
30- # Deployment of the screenshot tool or dashboard should happen inside of a Cronjob.
31- # For example, always deploying the screenshot functions on a per-commit base might cause problems
32- # with the screenshot tests, because the functions can be non-responsive for a few seconds.
33- if [[ " ${TRAVIS_EVENT_TYPE} " == " cron" ]]; then
34- if [[ " ${DEPLOY_MODE} " == " screenshot-tool" ]]; then
35- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-screenshot-tool.sh
36- fi
37-
38- if [[ " ${DEPLOY_MODE} " == " dashboard" ]]; then
39- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh
40- fi
41- # Deployment of the build artifacts and docs-content should only happen on a per-commit base.
42- # The target is to provide build artifacts in the GitHub repository for every commit.
43- else
44- if [[ " ${DEPLOY_MODE} " == " build-artifacts" ]]; then
45- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh
46- fi
47-
48- if [[ " ${DEPLOY_MODE} " == " docs-content" ]]; then
49- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh
50- fi
23+ if [[ " ${DEPLOY_MODE} " == " screenshot-tool" ]]; then
24+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-screenshot-tool.sh
25+ elif [[ " ${DEPLOY_MODE} " == " dashboard" ]]; then
26+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh
27+ elif [[ " ${DEPLOY_MODE} " == " build-artifacts" ]]; then
28+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh
29+ elif [[ " ${DEPLOY_MODE} " == " docs-content" ]]; then
30+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh
5131fi
0 commit comments