Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(aio): deploy previews early (right after build) #16734

Merged
merged 1 commit into from May 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion scripts/ci/build.sh
Expand Up @@ -41,7 +41,18 @@ travisFoldEnd "tsc a bunch of useless stuff"
if [[ ${CI_MODE:-} == "aio" ]]; then
travisFoldStart "build.aio"
cd "`dirname $0`/../../aio"
yarn run build
yarn build

# If this is a PR for angular/angular@master, deploy a snapshot for previewing early
# (if preconditions are met) regardless of the test outcome.
if [[ ${TRAVIS_REPO_SLUG} == "angular/angular" ]] &&
[[ ${TRAVIS_BRANCH} == "master" ]] &&
[[ $TRAVIS_PULL_REQUEST != "false" ]]; then
travisFoldStart "deploy.aio.pr-preview"
yarn deploy-preview -- --skip-build
travisFoldEnd "deploy.aio.pr-preview"
fi

cd -
travisFoldEnd "build.aio"
fi
5 changes: 1 addition & 4 deletions scripts/ci/deploy.sh
Expand Up @@ -51,10 +51,7 @@ case ${CI_MODE} in
cd ${TRAVIS_BUILD_DIR}/aio

if [[ $TRAVIS_PULL_REQUEST != "false" ]]; then
# This is a PR: deploy a snapshot for previewing (if preconditions met)
travisFoldStart "deploy.aio.pr-preview"
yarn deploy-preview
travisFoldEnd "deploy.aio.pr-preview"
# This is a PR: It has already been deployed in `build.sh`.
else
# This is upstream master: Deploy to staging
travisFoldStart "deploy.aio.staging"
Expand Down