From 94584dbc5640893844274038995cd522aadba8ef Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 11 Oct 2017 01:38:53 +0200 Subject: [PATCH] build: deploy dashboard, screenshot-tool in cronjob (#7618) * No longer deploy the dashboard and screenshot-tool per commit. --- scripts/ci/travis-deploy.sh | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/scripts/ci/travis-deploy.sh b/scripts/ci/travis-deploy.sh index 1feb6871fba..7350356143b 100755 --- a/scripts/ci/travis-deploy.sh +++ b/scripts/ci/travis-deploy.sh @@ -27,18 +27,25 @@ echo "" echo "Starting the deployment script. Running mode: ${DEPLOY_MODE}" echo "" -if [[ "${DEPLOY_MODE}" == "build-artifacts" ]]; then - retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh -fi +# Deployment of the screenshot tool or dashboard should happen inside of a Cronjob. +# For example, always deploying the screenshot functions on a per-commit base might cause problems +# with the screenshot tests, because the functions can be non-responsive for a few seconds. +if [[ "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then + if [[ "${DEPLOY_MODE}" == "screenshot-tool" ]]; then + retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-screenshot-tool.sh + fi -if [[ "${DEPLOY_MODE}" == "docs-content" ]]; then - retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh -fi + if [[ "${DEPLOY_MODE}" == "dashboard" ]]; then + retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh + fi +# Deployment of the build artifacts and docs-content should only happen on a per-commit base. +# The target is to provide build artifacts in the GitHub repository for every commit. +else + if [[ "${DEPLOY_MODE}" == "build-artifacts" ]]; then + retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh + fi -if [[ "${DEPLOY_MODE}" == "screenshot-tool" ]]; then - retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-screenshot-tool.sh -fi - -if [[ "${DEPLOY_MODE}" == "dashboard" ]]; then - retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh + if [[ "${DEPLOY_MODE}" == "docs-content" ]]; then + retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh + fi fi