chore: added presubmit-queue to travis
This commit is contained in:
parent
4cfe92c47a
commit
c5f8c9586f
10
.travis.yml
10
.travis.yml
|
@ -27,12 +27,16 @@ env:
|
|||
# This SSO token belongs to github account angular-github-ratelimit-token which has no access
|
||||
# (password is in Valentine)
|
||||
- TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
|
||||
# GITHUB_TOKEN_ANGULAR
|
||||
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
|
||||
matrix:
|
||||
- MODE=js DART_CHANNEL=dev
|
||||
# Make slowest build on top, so that we don't hog VMs while waiting for others to complete.
|
||||
- MODE=dart DART_CHANNEL=stable
|
||||
- MODE=dart DART_CHANNEL=dev
|
||||
- MODE=dart_experimental DART_CHANNEL=dev
|
||||
- MODE=saucelabs DART_CHANNEL=dev
|
||||
- MODE=js DART_CHANNEL=dev
|
||||
# Dissabled until we can make it pass.
|
||||
# - MODE=saucelabs DART_CHANNEL=dev
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
|
@ -61,12 +65,14 @@ install:
|
|||
|
||||
before_script:
|
||||
- mkdir -p $LOGS_DIR
|
||||
- ./scripts/ci/presubmit-queue-setup.sh
|
||||
|
||||
script:
|
||||
- ./scripts/ci/build_and_test.sh ${MODE}
|
||||
|
||||
after_script:
|
||||
- ./scripts/ci/print-logs.sh
|
||||
- ./scripts/ci/after-script.sh
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
set -e -o pipefail
|
||||
|
||||
echo '*******************'
|
||||
echo '** AFTER_SUCCESS **'
|
||||
echo '*******************'
|
||||
|
||||
|
||||
echo '---------------------'
|
||||
echo '-- WAIT FOR OTHERS --'
|
||||
echo '---------------------'
|
||||
|
||||
curl -Lo travis_after_all.py https://raw.github.com/jbdeboer/travis_after_all/master/travis_after_all.py
|
||||
python travis_after_all.py
|
||||
. .to_export_back
|
||||
|
||||
echo BUILD_LEADER=$BUILD_LEADER
|
||||
echo BUILD_AGGREGATE_STATUS=$BUILD_AGGREGATE_STATUS
|
||||
|
||||
if [ "$BUILD_LEADER" = "YES" ]; then
|
||||
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
|
||||
./scripts/ci/presubmit-queue-success.sh
|
||||
else
|
||||
echo "ERROR: Some Failed, not submitting"
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Other builds have not finished, not submitting"
|
||||
fi
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -e -o pipefail
|
||||
|
||||
if [ "$TRAVIS_REPO_SLUG" = "angular/angular" ]; then
|
||||
if [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then
|
||||
|
||||
echo '*********************'
|
||||
echo '** PRESUBMIT SETUP **'
|
||||
echo '*********************'
|
||||
|
||||
git config credential.helper "store --file=.git/credentials"
|
||||
# travis encrypt GITHUB_TOKEN_ANGULAR=??? --repo=angular/angular
|
||||
echo "https://${GITHUB_TOKEN_ANGULAR}:@github.com" > .git/credentials
|
||||
git config user.name "travis@travis-ci.org"
|
||||
|
||||
git remote add upstream https://github.com/angular/angular.git
|
||||
git fetch upstream master
|
||||
git rebase upstream/master
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
set -e -o pipefail
|
||||
|
||||
# If we're on the presubmit branch, the dev Dart release, and all unit
|
||||
# tests pass, merge the presubmit branch into master and push it.
|
||||
|
||||
|
||||
CHANNEL=`echo $JOB | cut -f 2 -d -`
|
||||
SHA=`git rev-parse HEAD`
|
||||
|
||||
echo Current channel is: $CHANNEL
|
||||
echo Current branch is: $TRAVIS_BRANCH
|
||||
echo Test result is: $TRAVIS_TEST_RESULT
|
||||
|
||||
if [ "$TRAVIS_REPO_SLUG" = "angular/angular" ]; then
|
||||
if [ $TRAVIS_TEST_RESULT -eq 0 ] && [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then
|
||||
echo '***************'
|
||||
echo '** PRESUBMIT **'
|
||||
echo '***************'
|
||||
echo
|
||||
echo "Pushing HEAD to master..."
|
||||
git stash
|
||||
git fetch upstream master
|
||||
git rebase upstream/master
|
||||
if git push upstream HEAD:master; then
|
||||
echo "$TRAVIS_BRANCH has been merged into master, deleting..."
|
||||
git push upstream :"$TRAVIS_BRANCH"
|
||||
else
|
||||
COMITTER_EMAIL=`git --no-pager show -s --format='%cE' HEAD`
|
||||
echo Sending failure email to ${COMITTER_EMAIL}
|
||||
mail \
|
||||
-s "Failed to merge branch $TRAVIS_BRANCH to master" \
|
||||
${COMMITTER_EMAIL} \
|
||||
<< EOM
|
||||
Your travis branch ${TRAVIS_BRANCH} failed!
|
||||
|
||||
https://travis-ci.org/angular/angular/builds/${TRAVIS_JOB_ID}
|
||||
|
||||
Please take a look.
|
||||
EOM
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
`
|
Loading…
Reference in New Issue