ci(aio): deploy from CI to staging
This commit is contained in:

committed by
Igor Minar

parent
c37af2af5a
commit
4165fddfc4
@ -19,4 +19,15 @@ node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/platform-brows
|
||||
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/router/tsconfig-build.json
|
||||
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/forms/tsconfig-build.json
|
||||
|
||||
if [[ ${CI_MODE} == "aio" ]]; then
|
||||
echo 'travis_fold:start:BUILD.aio'
|
||||
|
||||
# Build angular.io
|
||||
cd "`dirname $0`/../../angular.io"
|
||||
yarn run build
|
||||
cd -
|
||||
|
||||
echo 'travis_fold:end:BUILD.aio'
|
||||
fi
|
||||
|
||||
echo 'travis_fold:end:BUILD'
|
||||
|
29
scripts/ci-lite/deploy_aio_staging.sh
Executable file
29
scripts/ci-lite/deploy_aio_staging.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex -o pipefail
|
||||
|
||||
# Only deploy if this Travis job is for the upstream master branch
|
||||
if [[ ! ${TRAVIS} || ${CI_MODE} != "aio" || ${TRAVIS_PULL_REQUEST} || ${TRAVIS_BRANCH} != "master" ]]; then
|
||||
echo 0;
|
||||
fi
|
||||
|
||||
|
||||
echo 'travis_fold:start:aio.deploy'
|
||||
|
||||
# Setup environment
|
||||
cd `dirname $0`
|
||||
source ./env.sh
|
||||
cd ../..
|
||||
|
||||
|
||||
echo 'travis_fold:start:aio.deploy.staging'
|
||||
|
||||
# Deploy angular.io to staging
|
||||
cd "`dirname $0`/../../angular.io"
|
||||
yarn run deploy-staging
|
||||
cd -
|
||||
|
||||
echo 'travis_fold:end:aio.deploy.staging'
|
||||
|
||||
|
||||
echo 'travis_fold:end:aio.deploy'
|
@ -2,9 +2,11 @@
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
echo 'travis_fold:start:ENV'
|
||||
|
||||
NODE_VERSION=5.4.1
|
||||
NPM_VERSION=3.5.3
|
||||
YARN_VERSION=0.19.1
|
||||
CHROMIUM_VERSION=403382 # Chrome 53 linux stable, see https://www.chromium.org/developers/calendar
|
||||
SAUCE_CONNECT_VERSION=4.3.11
|
||||
|
||||
@ -45,6 +47,9 @@ fi
|
||||
|
||||
# GLOBALS
|
||||
|
||||
# Prepend `~/.yarn/bin` to the PATH
|
||||
export 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)
|
||||
export NODE_PATH=${NODE_PATH}:$(pwd)/../../dist/all:$(pwd)/../../dist/tools
|
||||
@ -74,3 +79,4 @@ if [[ ${TRAVIS} ]]; then
|
||||
export CHROME_BIN=${HOME}/.chrome/chromium/chrome-linux/chrome
|
||||
fi
|
||||
|
||||
echo 'travis_fold:end:ENV'
|
||||
|
@ -23,7 +23,7 @@ mkdir -p ${LOGS_DIR}
|
||||
# Install version of npm that we are locked against
|
||||
echo 'travis_fold:start:install.npm'
|
||||
npm install -g npm@${NPM_VERSION}
|
||||
echo 'travis_fold:end:install-npm'
|
||||
echo 'travis_fold:end:install.npm'
|
||||
|
||||
|
||||
# Install all npm dependencies according to shrinkwrap.json
|
||||
@ -32,12 +32,31 @@ node tools/npm/check-node-modules --purge || npm install
|
||||
echo 'travis_fold:end:install.node_modules'
|
||||
|
||||
|
||||
if [[ ${TRAVIS} && ${CI_MODE} == "aio" ]]; then
|
||||
|
||||
# angular.io: Install version of yarn that we are locked against
|
||||
echo 'travis_fold:start:install.aio.yarn'
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version "${YARN_VERSION}"
|
||||
echo 'travis_fold:end:install.aio.yarn'
|
||||
|
||||
|
||||
# angular.io: Install all yarn dependencies according to angular.io/yarn.lock
|
||||
echo 'travis_fold:start:install.aio.node_modules'
|
||||
cd "`dirname $0`/../../angular.io"
|
||||
yarn install
|
||||
cd -
|
||||
echo 'travis_fold:end:install.aio.node_modules'
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Install Chromium
|
||||
echo 'travis_fold:start:install.chromium'
|
||||
if [[ ${CI_MODE} == "js" || ${CI_MODE} == "e2e" ]]; then
|
||||
if [[ ${CI_MODE} == "js" || ${CI_MODE} == "e2e" || ${CI_MODE} == "aio" ]]; then
|
||||
./scripts/ci/install_chromium.sh
|
||||
fi
|
||||
echo 'travis_fold:end:install-chromium'
|
||||
echo 'travis_fold:end:install.chromium'
|
||||
|
||||
|
||||
# Install Sauce Connect
|
||||
echo 'travis_fold:start:install.sauceConnect'
|
||||
|
@ -14,7 +14,6 @@ cd ../..
|
||||
./scripts/ci-lite/test_saucelabs.sh
|
||||
./scripts/ci-lite/test_browserstack.sh
|
||||
./scripts/ci-lite/test_docs.sh
|
||||
|
||||
echo 'travis_fold:end:test-browser'
|
||||
./scripts/ci-lite/test_aio.sh
|
||||
|
||||
echo 'travis_fold:end:TEST'
|
||||
|
62
scripts/ci-lite/test_aio.sh
Executable file
62
scripts/ci-lite/test_aio.sh
Executable file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex -o pipefail
|
||||
|
||||
if [[ ${TRAVIS} && ${CI_MODE} != "aio" ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.aio'
|
||||
|
||||
# Setup environment
|
||||
cd `dirname $0`
|
||||
source ./env.sh
|
||||
cd ../..
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.aio.lint'
|
||||
|
||||
# Lint the code
|
||||
cd "`dirname $0`/../../angular.io"
|
||||
yarn run lint
|
||||
cd -
|
||||
|
||||
echo 'travis_fold:end:test.aio.lint'
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.aio.localChromeSetup'
|
||||
|
||||
# Start local Chrome
|
||||
if [[ ${TRAVIS} ]]; then
|
||||
sh -e /etc/init.d/xvfb start
|
||||
fi
|
||||
|
||||
echo 'travis_fold:end:test.aio.localChromeSetup'
|
||||
|
||||
|
||||
echo 'travis_fold:start:test.aio.unit'
|
||||
|
||||
# Run unit tests
|
||||
cd "`dirname $0`/../../angular.io"
|
||||
yarn test -- --single-run
|
||||
cd -
|
||||
|
||||
echo 'travis_fold:end:test.aio.unit'
|
||||
|
||||
|
||||
# TODO: Chrome crashes with the following error:
|
||||
# E/launcher - unknown error: Chrome failed to start: crashed
|
||||
# (Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.8.12-040812-generic x86_64)
|
||||
# echo 'travis_fold:start:test.aio.e2e'
|
||||
#
|
||||
# # Run e2e tests
|
||||
# cd "`dirname $0`/../../angular.io"
|
||||
# yarn start &
|
||||
# yarn run e2e
|
||||
# cd -
|
||||
#
|
||||
# echo 'travis_fold:end:test.aio.e2e'
|
||||
|
||||
|
||||
echo 'travis_fold:end:test.aio'
|
Reference in New Issue
Block a user