ci: redo how env variables are set and shared in ci to prevent collisions
This commit is contained in:
@ -3,15 +3,23 @@
|
||||
set -u -e -o pipefail
|
||||
|
||||
# Setup environment
|
||||
source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/_travis_fold.sh
|
||||
source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/env.sh
|
||||
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
|
||||
|
||||
|
||||
# Don't deploy if not running against angular/angular and not a PR
|
||||
# TODO(i): because we don't let deploy to run outside of angular/angular folks can't use their
|
||||
# private travis build to deploy anywhere. This is likely ok, but this means that @alexeagle's
|
||||
# fancy setup to publish ES2015 packages to github -build repos no longer works. This is ok
|
||||
# since with megamodules we'll have this feature built-in. We should still go and remove
|
||||
# since with flat modules we'll have this feature built-in. We should still go and remove
|
||||
# stuff that Alex put in for this from publish-build-artifacts.sh
|
||||
if [[ ${TRAVIS_REPO_SLUG} != "angular/angular" || ${TRAVIS_PULL_REQUEST} != "false" ]]; then
|
||||
echo "Skipping deploy to staging because this is a PR build."
|
||||
@ -22,7 +30,7 @@ fi
|
||||
case ${CI_MODE} in
|
||||
e2e)
|
||||
travisFoldStart "deploy.packages"
|
||||
./scripts/publish/publish-build-artifacts.sh
|
||||
${thisDir}/publish-build-artifacts.sh
|
||||
travisFoldEnd "deploy.packages"
|
||||
;;
|
||||
aio)
|
||||
|
Reference in New Issue
Block a user