From 0199e26167d398523509ef753c660c41390d1a8c Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sat, 5 Jan 2019 21:09:34 +0100 Subject: [PATCH] ci: remove travis ci setup (#27937) we no longer need it... yay!!! PR Close #27937 --- .travis.yml | 19 ----- aio/tools/examples/README.md | 4 +- scripts/ci/_travis-fold.sh | 83 --------------------- scripts/ci/angular.sh | 46 ------------ scripts/ci/build.sh | 14 ---- scripts/ci/cleanup.sh | 36 --------- scripts/ci/env.sh | 127 -------------------------------- scripts/ci/install-chromium.sh | 84 --------------------- scripts/ci/install.sh | 33 --------- scripts/ci/print-logs.sh | 18 ----- scripts/ci/test-browserstack.sh | 14 ---- scripts/ci/test-e2e.sh | 44 ----------- scripts/ci/test-saucelabs.sh | 14 ---- scripts/ci/test.sh | 37 ---------- tools/travis/travis-fold.js | 21 ------ 15 files changed, 2 insertions(+), 592 deletions(-) delete mode 100644 .travis.yml delete mode 100644 scripts/ci/_travis-fold.sh delete mode 100755 scripts/ci/angular.sh delete mode 100755 scripts/ci/build.sh delete mode 100755 scripts/ci/cleanup.sh delete mode 100755 scripts/ci/env.sh delete mode 100755 scripts/ci/install-chromium.sh delete mode 100755 scripts/ci/install.sh delete mode 100755 scripts/ci/print-logs.sh delete mode 100755 scripts/ci/test-browserstack.sh delete mode 100755 scripts/ci/test-e2e.sh delete mode 100755 scripts/ci/test-saucelabs.sh delete mode 100755 scripts/ci/test.sh delete mode 100644 tools/travis/travis-fold.js diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d0e211d7a5..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ - -env: - matrix: - - CI_MODE=e2e - - CI_MODE=js - - CI_MODE=saucelabs_required - - - -install: - - ./scripts/ci/install.sh - -script: - - ./scripts/ci/build.sh - - ./scripts/ci/test.sh - - ./scripts/ci/angular.sh - # all the scripts under this line will not quickly abort in case ${TRAVIS_TEST_RESULT} is 1 (job failure) - - ./scripts/ci/cleanup.sh - - ./scripts/ci/print-logs.sh diff --git a/aio/tools/examples/README.md b/aio/tools/examples/README.md index ac85afeafb..4af058f6e0 100644 --- a/aio/tools/examples/README.md +++ b/aio/tools/examples/README.md @@ -3,8 +3,8 @@ Many of the documentation pages contain snippets of code examples. Extract these snippets from real working example applications, which are stored in subfolders of the `/aio/content/examples` folder. Each example can be built and run independently. Each example also provides e2e specs, which -are run as part of our Travis build tasks, to verify that the examples continue to work as expected, -as changes are made to the core Angular libraries. +are run as part of our CircleCI legacy build tasks, to verify that the examples continue to work as +expected, as changes are made to the core Angular libraries. In order to build, run and test these examples independently you need to install dependencies into their sub-folder. Also there are a number of common boilerplate files that are needed to configure diff --git a/scripts/ci/_travis-fold.sh b/scripts/ci/_travis-fold.sh deleted file mode 100644 index b3dd69c725..0000000000 --- a/scripts/ci/_travis-fold.sh +++ /dev/null @@ -1,83 +0,0 @@ -# private variable to track folds within this script -travisFoldStack=() - -function travisFoldStart() { - local foldName="${0#./} ${1}" - # get current time as nanoseconds since the beginning of the epoch - foldStartTime=$(date +%s%N) - # convert all non alphanum chars except for "-" and "." to "--" - local sanitizedFoldName=${foldName//[^[:alnum:]\-\.]/--} - # strip trailing "-" - sanitizedFoldName=${sanitizedFoldName%-} - # push the foldName onto the stack - travisFoldStack+=("${sanitizedFoldName}|${foldStartTime}") - - echo "" - if [[ ${TRAVIS:-} ]]; then - echo "travis_fold:start:${sanitizedFoldName}" - echo "travis_time:start:${sanitizedFoldName}" - fi - local enterArrow="===> ${foldName} ==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>==>" - # keep all messages consistently wide 80chars regardless of the foldName - echo ${enterArrow:0:100} - if [[ ${2:-} != "no-xtrace" ]]; then - # turn on verbose mode so that we have better visibility into what's going on - # http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html#table_02_01 - set -x - fi -} - -function travisFoldEnd() { - set +x - local foldName="${0#./} ${1}" - # convert all non alphanum chars except for "-" and "." to "--" - local sanitizedFoldName=${foldName//[^[:alnum:]\-\.]/--} - # strip trailing "-" - sanitizedFoldName=${sanitizedFoldName%-} - - # consult and update travisFoldStack - local lastFoldIndex=$(expr ${#travisFoldStack[@]} - 1) - local lastFoldString=${travisFoldStack[$lastFoldIndex]} - # split the string by | and then turn that into an array - local lastFoldArray=(${lastFoldString//\|/ }) - local lastSanitizedFoldName=${lastFoldArray[0]} - - if [[ ${TRAVIS:-} ]]; then - local lastFoldStartTime=${lastFoldArray[1]} - local foldFinishTime=$(date +%s%N) - local foldDuration=$(expr ${foldFinishTime} - ${lastFoldStartTime}) - - # write into build-perf.log file - local logIndent=$(expr ${lastFoldIndex} \* 2) - printf "%6ss%${logIndent}s: %s\n" $(expr ${foldDuration} / 1000000000) " " "${foldName}" >> ${LOGS_DIR}/build-perf.log - fi - - # pop - travisFoldStack=(${travisFoldStack[@]:0:lastFoldIndex}) - - # check for misalignment - if [[ ${lastSanitizedFoldName} != ${sanitizedFoldName} ]]; then - echo "Travis fold mis-alignment detected! travisFoldEnd expected sanitized fold name '${lastSanitizedFoldName}', but received '${sanitizedFoldName}' (after sanitization)" - exit 1 - fi - - local returnArrow="<=== ${foldName} <==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==" - # keep all messages consistently wide 80chars regardless of the foldName - echo ${returnArrow:0:100} - echo "" - if [[ ${TRAVIS:-} ]]; then - echo "travis_time:end:${sanitizedFoldName}:start=${lastFoldStartTime},finish=${foldFinishTime},duration=${foldDuration}" - echo "travis_fold:end:${sanitizedFoldName}" - fi -} - - -function travisFoldReturnArrows() { - # print out return arrows so that it's easy to see the end of the script in the log - echo "" - returnArrow="<=== ${0#./} <==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==" - # keep all messages consistently wide 80chars regardless of the foldName - echo ${returnArrow:0:100} - echo "<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<===" - echo "" -} diff --git a/scripts/ci/angular.sh b/scripts/ci/angular.sh deleted file mode 100755 index ec28c34232..0000000000 --- a/scripts/ci/angular.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# If the previous commands in the `script` section of .travis.yaml failed, then abort. -# The variable is not set in early stages of the build, so we default to 0 there. -# https://docs.travis-ci.com/user/environment-variables/ -if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then - exit 1; -fi - - -# this ascii art was created based on the official Angular logo from https://angular.io/presskit.html -# converted using http://www.text-image.com/convert/ -# colors added based on http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux -RED='\033[0;31m' -LRED='\033[1;31m' -WHITE='\033[1;37m' - - -echo -e ${LRED}' ``'${RED}'`` ' -echo -e ${LRED}' `.--://'${RED}':::--.`' -echo -e ${LRED}' `..-:////////'${RED}':::::::::-.``' -echo -e ${LRED}' `.-::////////////'${WHITE}'oo'${RED}'::::::::::::::-.`' -echo -e ${LRED}' `--://///////////////'${WHITE}'+NN+'${RED}'::::::::::::::::::-.`' -echo -e ${LRED}' `///////////////////'${WHITE}'+NMMN/'${RED}':::::::::::::::::::`' -echo -e ${LRED}' ///////////////////'${WHITE}'mMMMMm/'${RED}'::::::::::::::::::' -echo -e ${LRED}' ://///////////////'${WHITE}'dMMMMMMd/'${RED}':::::::::::::::::' -echo -e ${LRED}' -////////////////'${WHITE}'dMMMNNMMMh/'${RED}':::::::::::::::-' -echo -e ${LRED}' .///////////////'${WHITE}'hMMMM++MMMMh'${RED}':::::::::::::::.' -echo -e ${LRED}' `//////////////'${WHITE}'yMMMMs'${LRED}'/'${RED}':'${WHITE}'sMMMMy'${RED}'::::::::::::::`' -echo -e ${LRED}' :////////////'${WHITE}'sMMMMy'${LRED}'//'${RED}'::'${WHITE}'yMMMMs'${RED}':::::::::::::' -echo -e ${LRED}' -///////////'${WHITE}'oMMMMd'${LRED}'///'${RED}'::'${WHITE}'/dMMMMo'${RED}':::::::::::-' -echo -e ${LRED}' .//////////'${WHITE}'+NMMMMddddddddMMMMN+'${RED}'::::::::::.' -echo -e ${LRED}' `/////////'${WHITE}'+NMMMMMMMMMMMMMMMMMMN+'${RED}':::::::::`' -echo -e ${LRED}' :////////'${WHITE}'mMMMMyyyyyyyyyyyyMMMMm/'${RED}'::::::::' -echo -e ${LRED}' -///////'${WHITE}'mMMMMs'${LRED}'//////'${RED}'::::::'${WHITE}'sMMMMm/'${RED}'::::::-' -echo -e ${LRED}' .//////'${WHITE}'dMMMMy'${LRED}'///////'${RED}':::::::'${WHITE}'yMMMMd/'${RED}':::::.' -echo -e ${LRED}' `/////'${WHITE}'hMMMMd'${LRED}'////////'${RED}':::::::'${WHITE}'/dMMMMh'${RED}':::::`' -echo -e ${LRED}' -://///////////////'${RED}'::::::::::::::::::-' -echo -e ${LRED}' `.://////////////'${RED}'::::::::::::::-.`' -echo -e ${LRED}' `-://////////'${RED}':::::::::::-`' -echo -e ${LRED}' `.-://////'${RED}':::::::-.`' -echo -e ${LRED}' `.:///'${RED}'::::.`' -echo -e ${LRED}' .-'${RED}'-` ' - diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh deleted file mode 100755 index 1b1ad93068..0000000000 --- a/scripts/ci/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -travisFoldStart "tsc all" - $(npm bin)/tsc -p packages - $(npm bin)/tsc -p packages/examples - $(npm bin)/tsc -p modules -travisFoldEnd "tsc all" diff --git a/scripts/ci/cleanup.sh b/scripts/ci/cleanup.sh deleted file mode 100755 index 7b1046d7c9..0000000000 --- a/scripts/ci/cleanup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -case ${CI_MODE} in - js) - ;; - saucelabs_required) - travisFoldStart "teardown.sauceConnect" - ./scripts/sauce/sauce_connect_teardown.sh - travisFoldEnd "teardown.sauceConnect" - ;; - browserstack_required) - travisFoldStart "teardown.browserStack" - ./scripts/browserstack/teardown_tunnel.sh - travisFoldEnd "teardown.browserStack" - ;; - saucelabs_optional) - travisFoldStart "teardown.sauceConnect" - ./scripts/sauce/sauce_connect_teardown.sh - travisFoldEnd "teardown.sauceConnect" - ;; - browserstack_optional) - travisFoldStart "teardown.browserStack" - ./scripts/browserstack/teardown_tunnel.sh - travisFoldEnd "teardown.browserStack" - ;; -esac - -# Print return arrows as a log separator -travisFoldReturnArrows diff --git a/scripts/ci/env.sh b/scripts/ci/env.sh deleted file mode 100755 index 78adcf8c5a..0000000000 --- a/scripts/ci/env.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env bash - -# because this script is being source-ed via .travis.yaml, -# we need to restore the original options so that that we don't interfere with -# travis' internals -readonly ORIGINAL_SHELL_OPTIONS=$(set +o) - -# this script is extra noisy and used in many places during the build so we suppress the trace with +x to reduce the noise -set -u -e -o pipefail - -# sets and optionally prints environmental variable -# usage: setEnvVar variableName variableValue -function setEnvVar() { - local name=$1 - local value=$2 - - if [[ ${print} == "print" ]]; then - echo ${name}=${value} - fi - export ${name}="${value}" -} - -# use BASH_SOURCE so that we get the right path when this script is called AND source-d -readonly thisDir=$(cd $(dirname ${BASH_SOURCE[0]}); pwd) -readonly print=${1:-} - -# print bash version just so that we know what is running all the scripts -if [[ ${print} == "print" ]]; then - bash --version -fi - - -####################### -# CUSTOM GLOBALS # -####################### - -setEnvVar NODE_VERSION 10.9.0 -setEnvVar YARN_VERSION 1.12.1 -setEnvVar CHROMIUM_VERSION 561733 # Chrome 68 linux stable, see https://www.chromium.org/developers/calendar -setEnvVar CHROMEDRIVER_VERSION_ARG "--versions.chrome 2.41" -setEnvVar SAUCE_CONNECT_VERSION 4.5.2 -setEnvVar ANGULAR_CLI_VERSION 1.6.3 -setEnvVar CI_AIO_MIN_PWA_SCORE 95 -setEnvVar CI_BRANCH $TRAVIS_BRANCH -setEnvVar CI_COMMIT $TRAVIS_COMMIT -setEnvVar CI_COMMIT_RANGE $TRAVIS_COMMIT_RANGE -setEnvVar CI_PULL_REQUEST $TRAVIS_PULL_REQUEST -setEnvVar PROJECT_ROOT $(cd ${thisDir}/../..; pwd) - -if [[ ${TRAVIS:-} ]]; then - case ${CI_MODE} in - js) - setEnvVar KARMA_JS_BROWSERS ChromeNoSandbox - ;; - saucelabs_required) - setEnvVar KARMA_JS_BROWSERS `node -e "console.log(require('/home/travis/build/angular/angular/browser-providers.conf').sauceAliases.CI_REQUIRED.join(','))"` - ;; - browserstack_required) - setEnvVar KARMA_JS_BROWSERS `node -e "console.log(require('/home/travis/build/angular/angular/browser-providers.conf').browserstackAliases.CI_REQUIRED.join(','))"` - ;; - saucelabs_optional) - setEnvVar KARMA_JS_BROWSERS `node -e "console.log(require('/home/travis/build/angular/angular/browser-providers.conf').sauceAliases.CI_OPTIONAL.join(','))"` - ;; - browserstack_optional) - setEnvVar KARMA_JS_BROWSERS `node -e "console.log(require('/home/travis/build/angular/angular/browser-providers.conf').browserstackAliases.CI_OPTIONAL.join(','))"` - ;; - esac -else - setEnvVar KARMA_JS_BROWSERS Chrome -fi - - -if [[ ${TRAVIS:-} ]]; then - # used by xvfb that is used by Chromium - setEnvVar DISPLAY :99.0 - - # Use newer version of GCC to that is required to compile native npm modules for Node v4+ on Ubuntu Precise - # more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements - setEnvVar CXX g++-4.8 - - # Used by karma and karma-chrome-launcher - # In order to have a meaningful SauceLabs badge on the repo page, - # the angular2-ci account is used only when pushing commits to master; - # in all other cases, the regular angular-ci account is used. - if [ "${CI_PULL_REQUEST}" = "false" ] && [ "${CI_BRANCH}" = "master" ]; then - setEnvVar SAUCE_USERNAME angular2-ci - # Not using use `setEnvVar` so that we don't print the key. - export SAUCE_ACCESS_KEY=693ebc16208a-0b5b-1614-8d66-a2662f4e - else - setEnvVar SAUCE_USERNAME angular-ci - # Not using use `setEnvVar` so that we don't print the key. - export SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 - fi - - setEnvVar BROWSER_STACK_USERNAME angularteam1 - # not using use setEnvVar so that we don't print the key - export BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq - setEnvVar CHROME_BIN ${HOME}/.chrome/chromium/chrome-linux/chrome - setEnvVar BROWSER_PROVIDER_READY_FILE /tmp/angular-build/browser-provider-tunnel-init.lock -fi - - - -####################### -# PREEXISTING GLOBALS # -####################### - -# Prepend `~/.yarn/bin` to the PATH -setEnvVar PATH $HOME/.yarn/bin:$PATH - -# Append dist/all to the NODE_PATH so that cjs module resolver finds find the packages that use -# absolute module ids (e.g. @angular/core) -setEnvVar NODE_PATH ${NODE_PATH:-}:${PROJECT_ROOT}/dist/all:${PROJECT_ROOT}/dist/tools -setEnvVar LOGS_DIR /tmp/angular-build/logs - -# strip leading "/home/travis/build/angular/angular/" or "./" path. Could this be done in one shot? -CURRENT_SHELL_SOURCE_FILE=${BASH_SOURCE#${PROJECT_ROOT}/} -export CURRENT_SHELL_SOURCE_FILE=${CURRENT_SHELL_SOURCE_FILE#./} -# Prefix xtrace output with file name/line and optionally function name -# http://wiki.bash-hackers.org/scripting/debuggingtips#making_xtrace_more_useful -# TODO(i): I couldn't figure out how to set this via `setEnvVar` so I just set it manually -export PS4='+(${CURRENT_SHELL_SOURCE_FILE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' -if [[ ${print} == "print" ]]; then - echo PS4=${PS4} -fi - -eval "${ORIGINAL_SHELL_OPTIONS}" diff --git a/scripts/ci/install-chromium.sh b/scripts/ci/install-chromium.sh deleted file mode 100755 index 627d915694..0000000000 --- a/scripts/ci/install-chromium.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -# This script basically follows the instructions to download an old version of Chromium: https://www.chromium.org/getting-involved/download-chromium -# 1) It retrieves the current stable version number from https://www.chromium.org/developers/calendar (via the https://omahaproxy.appspot.com/all file), e.g. 359700 for Chromium 48. -# 2) It checks the Travis cache for this specific version -# 3) If not available, it downloads and caches it, using the "decrement commit number" trick. - -#Build version read from the OmahaProxy CSV Viewer at https://www.chromium.org/developers/calendar -#Let's use the following version of Chromium, and inform about availability of newer build from https://omahaproxy.appspot.com/all -# -# CHROMIUM_VERSION <<< this variable is now set via env.sh - -PLATFORM="$(uname -s)" -case "$PLATFORM" in - (Darwin) - ARCHITECTURE=Mac - DIST_FILE=chrome-mac.zip - ;; - (Linux) - ARCHITECTURE=Linux_x64 - DIST_FILE=chrome-linux.zip - ;; - (*) - echo Unsupported platform $PLATFORM. Exiting ... >&2 - exit 3 - ;; -esac - -TMP=$(curl -s "https://omahaproxy.appspot.com/all") || true -oldIFS="$IFS" -IFS=' -' -IFS=${IFS:0:1} -lines=( $TMP ) -IFS=',' -for line in "${lines[@]}" - do - lineArray=($line); - if [ "${lineArray[0]}" = "linux" ] && [ "${lineArray[1]}" = "stable" ] ; then - LATEST_CHROMIUM_VERSION="${lineArray[7]}" - fi -done -IFS="$oldIFS" - -CHROMIUM_DIR=$HOME/.chrome/chromium -CHROMIUM_BIN=$CHROMIUM_DIR/chrome-linux/chrome -CHROMIUM_VERSION_FILE=$CHROMIUM_DIR/VERSION - -EXISTING_VERSION="" -if [[ -f $CHROMIUM_VERSION_FILE && -x $CHROMIUM_BIN ]]; then - EXISTING_VERSION=`cat $CHROMIUM_VERSION_FILE` - echo Found cached Chromium version: ${EXISTING_VERSION} -fi - -if [[ "$EXISTING_VERSION" != "$CHROMIUM_VERSION" ]]; then - echo Downloading Chromium version: ${CHROMIUM_VERSION} - rm -fR $CHROMIUM_DIR - mkdir -p $CHROMIUM_DIR - - NEXT=$CHROMIUM_VERSION - FILE="chrome-linux.zip" - STATUS=404 - while [[ $STATUS == 404 && $NEXT -ge 0 ]] - do - echo Fetch Chromium version: ${NEXT} - STATUS=$(curl "https://storage.googleapis.com/chromium-browser-snapshots/${ARCHITECTURE}/${NEXT}/${DIST_FILE}" -s -w %{http_code} --create-dirs -o $FILE) || true - NEXT=$[$NEXT-1] - done - - unzip $FILE -d $CHROMIUM_DIR - rm $FILE - echo $CHROMIUM_VERSION > $CHROMIUM_VERSION_FILE -fi - -if [[ "$CHROMIUM_VERSION" != "$LATEST_CHROMIUM_VERSION" ]]; then - echo "New version of Chromium available. Update 'scripts/ci/env.sh' with build number: $LATEST_CHROMIUM_VERSION" -fi diff --git a/scripts/ci/install.sh b/scripts/ci/install.sh deleted file mode 100755 index eff30608bb..0000000000 --- a/scripts/ci/install.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -TRAVIS=${TRAVIS:-} -CI_MODE=${CI_MODE:-} - - - -mkdir -p ${LOGS_DIR} - - -# Install Sauce Connect -if [[ ${TRAVIS}] && (${CI_MODE} == "saucelabs_required" || ${CI_MODE} == "saucelabs_optional") ]]; then - travisFoldStart "install-sauceConnect" - ( - ${thisDir}/../sauce/sauce_connect_setup.sh - ) - travisFoldEnd "install-sauceConnect" -fi - - -# Install BrowserStack Tunnel -if [[ ${TRAVIS} && (${CI_MODE} == "browserstack_required" || ${CI_MODE} == "browserstack_optional") ]]; then - travisFoldStart "install-browserstack" - ( - ${thisDir}/../browserstack/start_tunnel.sh - ) - travisFoldEnd "install-browserstack" -fi - -# Print return arrows as a log separator -travisFoldReturnArrows diff --git a/scripts/ci/print-logs.sh b/scripts/ci/print-logs.sh deleted file mode 100755 index 37cbf74e34..0000000000 --- a/scripts/ci/print-logs.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -for FILE in ${LOGS_DIR}/*; do - travisFoldStart "print log file: ${FILE}" - cat $FILE - travisFoldEnd "print log file: ${FILE}" -done - - -# Print return arrows as a log separator -travisFoldReturnArrows diff --git a/scripts/ci/test-browserstack.sh b/scripts/ci/test-browserstack.sh deleted file mode 100755 index 008813917e..0000000000 --- a/scripts/ci/test-browserstack.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -travisFoldStart "test.unit.browserstack" - ./scripts/browserstack/waitfor_tunnel.sh - export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev` - $(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} -travisFoldEnd "test.unit.browserstack" diff --git a/scripts/ci/test-e2e.sh b/scripts/ci/test-e2e.sh deleted file mode 100755 index bc18b729f6..0000000000 --- a/scripts/ci/test-e2e.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -travisFoldStart "test.e2e.buildPackages" - ./build.sh -travisFoldEnd "test.e2e.buildPackages" - -travisFoldStart "test.e2e.check-cycle" - $(npm bin)/gulp check-cycle -travisFoldEnd "test.e2e.check-cycle" - -# Serve files for e2e tests -( - $(npm bin)/gulp serve & - $(npm bin)/gulp serve-examples & -) - -travisFoldStart "test.e2e.protractor-e2e" - NODE_PATH=$NODE_PATH:./dist/all $(npm bin)/protractor ./protractor-e2e.conf.js --bundles=true -travisFoldEnd "test.e2e.protractor-e2e" -travisFoldStart "test.e2e.protractor-examples-e2e" - NODE_PATH=$NODE_PATH:./dist/all $(npm bin)/protractor ./protractor-examples-e2e.conf.js --bundles=true -travisFoldEnd "test.e2e.protractor-examples-e2e" -travisFoldStart "test.e2e.protractor-perf" - NODE_PATH=$NODE_PATH:./dist/all $(npm bin)/protractor ./protractor-perf.conf.js --bundles=true --dryrun -travisFoldEnd "test.e2e.protractor-perf" - -# TODO(i): temporarily disable this test because we don't have rxjs backwards compatibility package -# and cdk+material are not yet compatible with rxjs v6 -# uncomment when we have cdk and material releases compatible with rxjs v6 -#travisFoldStart "test.e2e.offlineCompiler" -# #TODO(alexeagle): move offline_compiler_test to integration/ -# ${thisDir}/offline_compiler_test.sh -#travisFoldEnd "test.e2e.offlineCompiler" - -travisFoldStart "test.e2e.source-maps" - ./node_modules/.bin/gulp source-map-test -travisFoldEnd "test.e2e.source-maps" diff --git a/scripts/ci/test-saucelabs.sh b/scripts/ci/test-saucelabs.sh deleted file mode 100755 index e141d251e8..0000000000 --- a/scripts/ci/test-saucelabs.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -travisFoldStart "test.unit.saucelabs" - ./scripts/sauce/sauce_connect_block.sh - SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev` - $(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} --reporters dots,saucelabs -travisFoldEnd "test.unit.saucelabs" diff --git a/scripts/ci/test.sh b/scripts/ci/test.sh deleted file mode 100755 index 2286dbed66..0000000000 --- a/scripts/ci/test.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -set -u -e -o pipefail - -# Setup environment -readonly thisDir=$(cd $(dirname $0); pwd) -source ${thisDir}/_travis-fold.sh - - -# If the previous commands in the `script` section of .travis.yaml failed, then abort. -# The variable is not set in early stages of the build, so we default to 0 there. -# https://docs.travis-ci.com/user/environment-variables/ -if [[ ${TRAVIS_TEST_RESULT=0} == 1 ]]; then - exit 1; -fi - - -case ${CI_MODE} in - js) - ${thisDir}/test-js.sh - ;; - e2e) - ${thisDir}/test-e2e.sh - ;; - saucelabs_required) - ${thisDir}/test-saucelabs.sh - ;; - browserstack_required) - ${thisDir}/test-browserstack.sh - ;; - saucelabs_optional) - ${thisDir}/test-saucelabs.sh - ;; - browserstack_optional) - ${thisDir}/test-browserstack.sh - ;; -esac diff --git a/tools/travis/travis-fold.js b/tools/travis/travis-fold.js deleted file mode 100644 index 4a89309c62..0000000000 --- a/tools/travis/travis-fold.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -// tslint:disable:no-console -module.exports = function travisFoldStart(name) { - if (process.env.TRAVIS) console.log('travis_fold:start:' + encode(name)); - - return function travisFoldEnd() { - if (process.env.TRAVIS) console.log('travis_fold:end:' + encode(name)); - }; -}; - - -function encode(name) { - return name.replace(/\W/g, '-').replace(/-$/, ''); -}