File tree Expand file tree Collapse file tree 6 files changed +67
-39
lines changed Expand file tree Collapse file tree 6 files changed +67
-39
lines changed Original file line number Diff line number Diff line change 2828 - env : " MODE=browserstack_required"
2929 - env : " MODE=travis_required"
3030 - stage : Deploy
31- script : ./scripts/ci/publish-artifacts.sh
32- env : " MODE=release"
33-
31+ env : " DEPLOY_MODE=build-artifacts"
32+ - env : " DEPLOY_MODE=docs-content"
33+ - env : " DEPLOY_MODE=screenshot-tool"
34+ - env : " DEPLOY_MODE=dashboard"
3435env :
3536 global :
3637 - LOGS_DIR=/tmp/angular-material2-build/logs
@@ -51,7 +52,7 @@ before_script:
5152 - mkdir -p $LOGS_DIR
5253
5354script :
54- - ./scripts/ci/build-and-test .sh
55+ - ./scripts/ci/travis-script .sh
5556
5657cache :
5758 directories :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Script that runs in the deploy stage after the testing stage of Travis passed.
4+ # Build artifacts and docs content will be published to different repositories.
5+
6+ # The script should immediately exit if any command in the script fails.
7+ set -e
8+
9+ # Go to the project root directory
10+ cd $( dirname $0 ) /../..
11+
12+ # If the current Travis job is triggered by a pull request skip the deployment.
13+ # This check is necessary because Travis still tries to run the deploy build-stage for
14+ # pull requests.
15+ if [[ " $TRAVIS_PULL_REQUEST " != " false" ]]; then
16+ echo " Build artifacts and docs content will only be deployed in Travis push builds."
17+ exit 0;
18+ fi
19+
20+ echo " "
21+ echo " Starting the deployment script. Running mode: ${DEPLOY_MODE} "
22+ echo " "
23+
24+ if [[ " ${DEPLOY_MODE} " == " build-artifacts" ]]; then
25+ ./scripts/deploy/publish-build-artifacts.sh
26+ fi
27+
28+ if [[ " ${DEPLOY_MODE} " == " docs-content" ]]; then
29+ ./scripts/deploy/publish-docs-content.sh
30+ fi
31+
32+ if [[ " ${DEPLOY_MODE} " == " screenshot-tool" ]]; then
33+ ./scripts/deploy/deploy-screenshot-functions.sh
34+ fi
35+
36+ if [[ " ${DEPLOY_MODE} " == " dashboard" ]]; then
37+ ./scripts/deploy/deploy-dashboard.sh
38+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Script that runs in every Travis CI container. The script is responsible for delegating
4+ # to the different scripts that should run for specific Travis jobs in a build stage.
5+
6+ # The script should immediately exit if any command in the script fails.
7+ set -e
8+
9+ # Go to project directory
10+ cd $( dirname $0 ) /../..
11+
12+ if [[ -z " $TRAVIS " ]]; then
13+ echo " This script can only run inside of Travis build jobs."
14+ exit 1
15+ fi
16+
17+ if [[ " ${MODE} " ]]; then
18+ ./scripts/ci/travis-testing.sh
19+ elif [[ " ${DEPLOY_MODE} " ]]; then
20+ ./scripts/ci/travis-deploy.sh
21+ fi
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Script that runs in the testing build stage of Travis and is responsible for testing
4+ # the project in different Travis jobs of the current build stage.
5+
36# The script should immediately exit if any command in the script fails.
47set -e
58
You can’t perform that action at this time.
0 commit comments