-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
31 lines (29 loc) · 1.1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
sudo: true
language: bash
env:
global:
- JENKINS_HOST=jenkins-devsupport.library.ucla.edu
- JENKINS_USER="${TRAVIS_JENKINS_USER}"
- JENKINS_API_CALIFORNICA="${TRAVIS_JENKINS_API_CALIFORNICA}"
script:
- echo "No more tests in Travis! The only function remaining is to trigger Jenkins deploys."
notifications:
email: false
after_success:
- |
# A canary to allow verification that our firewall allows Travis in
curl https://api.ipify.org; echo
BASE_URL="https://$JENKINS_USER@$JENKINS_HOST"
JOB=job/DeployCalifornica
API="$JENKINS_API_CALIFORNICA"
if [[ $TRAVIS_BRANCH == 'main' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
BASE_QUERY="buildWithParameters?token=$API&GIT_BRANCH=$TRAVIS_BRANCH&cause=Travis+Build"
HOST=t-w-californica01.library.ucla.edu
curl "$BASE_URL/$JOB/$BASE_QUERY&DEPLOY_HOST=$HOST"
fi
if [[ $TRAVIS_TAG != "" ]]; then
BASE_QUERY="buildWithParameters?token=$API&GIT_BRANCH=$TRAVIS_TAG&cause=Travis+Build+With+Tag"
HOST=s-w-californica01.library.ucla.edu
curl "$BASE_URL/$JOB/$BASE_QUERY&DEPLOY_HOST=$HOST"
fi