From cf65d9624decc9090d3db67b7a60bc4a0c98b5b1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 21 Dec 2016 19:07:43 +0000 Subject: [PATCH] chore: add jobs for current release branch (#2902) * ci: add jobs for current release branch * add 2.4.x branch support --- .travis.yml | 20 +++++++++++++++----- scripts/deploy-install-preview.sh | 2 +- scripts/examples-install-preview.sh | 9 ++++++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index e91ceab4a8..bb3866b063 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,19 +10,29 @@ env: - DBUS_SESSION_BUS_ADDRESS=/dev/null - DISPLAY=:99.0 - CHROME_BIN=chromium-browser - - LATEST_RELEASE=2.3.0 + - LATEST_RELEASE=2.3.1 + - LATEST_RELEASE_BRANCH=2.4.x - TASK_FLAGS="--dgeni-log=warn" matrix: + # current angular release jobs - TASK=lint - TASK="run-e2e-tests --fast" SCRIPT=examples-install.sh - - TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh - TASK=build-compile SCRIPT=deploy-install.sh WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" - - TASK=build-compile SCRIPT=deploy-install-preview.sh WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" + # current angular release branch jobs + - TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH + - TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" + # angular master jobs + - TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=master + - TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=master WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" matrix: fast_finish: true allow_failures: - - env: TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh - - env: TASK=build-compile SCRIPT=deploy-install-preview.sh WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" + # allow current angular release branch and master to fail + # these should be moved to a daily task instead of being ran on every PR + - env: TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH + - env: TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" + - env: TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=master + - env: TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=master WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v" before_install: - source ./scripts/env-set.sh - ./scripts/before-install.sh diff --git a/scripts/deploy-install-preview.sh b/scripts/deploy-install-preview.sh index b4998f6717..f772905174 100755 --- a/scripts/deploy-install-preview.sh +++ b/scripts/deploy-install-preview.sh @@ -3,4 +3,4 @@ set -ex -o pipefail ./scripts/deploy-install.sh -(cd ../angular && git checkout master) \ No newline at end of file +(cd ../angular && git checkout $PREVIEW_BRANCH) diff --git a/scripts/examples-install-preview.sh b/scripts/examples-install-preview.sh index cd2beddd07..3778ac4875 100755 --- a/scripts/examples-install-preview.sh +++ b/scripts/examples-install-preview.sh @@ -2,5 +2,12 @@ set -ex -o pipefail +PREFIX=2.0.0- + +if [ "$PREVIEW_BRANCH" != "master" ]; then + PREVIEW_BRANCH=$PREFIX$(git ls-remote https://github.com/angular/angular | grep $LATEST_RELEASE_BRANCH) + PREVIEW_BRANCH=${PREVIEW_BRANCH:0:13} +fi + ./scripts/examples-install.sh -(cd public/docs/_examples && npm install angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,forms,router-deprecated,router,upgrade}-builds --no-optional) \ No newline at end of file +(cd public/docs/_examples && npm install angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,forms,router,upgrade}-builds#$PREVIEW_BRANCH --no-optional)