forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added presubmit-queue to travis
- Loading branch information
Showing
4 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
` |