@@ -12,41 +12,19 @@ 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
22-
2315# Variable the specifies how often the deploy script should be invoked if it fails.
2416DEPLOY_RETRIES=1
2517
2618echo " "
2719echo " Starting the deployment script. Running mode: ${DEPLOY_MODE} "
2820echo " "
2921
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- elif [[ " ${DEPLOY_MODE} " == " dashboard" ]]; then
37- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh
38- else
39- echo " Docs content and build artifacts won't be published in Travis cronjobs."
40- fi
41-
42- # Deployment of the build artifacts and docs-content should only happen on a per-commit base.
43- # The target is to provide build artifacts in the GitHub repository for every commit.
44- else
45- if [[ " ${DEPLOY_MODE} " == " build-artifacts" ]]; then
46- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh
47- elif [[ " ${DEPLOY_MODE} " == " docs-content" ]]; then
48- retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh
49- else
50- echo " The dashboard and screenshot-tool will only be deployed in Travis cronjobs."
51- fi
22+ if [[ " ${DEPLOY_MODE} " == " screenshot-tool" ]]; then
23+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-screenshot-tool.sh
24+ elif [[ " ${DEPLOY_MODE} " == " dashboard" ]]; then
25+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh
26+ elif [[ " ${DEPLOY_MODE} " == " build-artifacts" ]]; then
27+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh
28+ elif [[ " ${DEPLOY_MODE} " == " docs-content" ]]; then
29+ retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh
5230fi
0 commit comments