forked from jaegertracing/jaeger-client-python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
53 lines (42 loc) · 2.86 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
sudo: required
dist: trusty
language: python
matrix:
include:
- python: '2.7'
env: COVER=1
- python: '2.7'
env: CROSSDOCK=1
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.6.0
- COMMIT=${TRAVIS_COMMIT::8}
# DOCKER_USER
- secure: jZw+Ael/sqI4C+5MTTyXw1j3ZME6YiyPoopQCPtFEV5Dn7vaeh0ZDUEbf3T1fo+7Gq2W40POZ7awYwYOAD2OirNOyAbjuK0lAuDm4kfLg1ckhA6PKtqRwUYZG1zx+AKS8S4TDxNZ1ZhP0IWHsWaumb9QYK9tGX5c9tq7LRHwswHbInJKUKdwlLk8mBJPjSPKGae48diGZoofefMCzLJ6pMFZkUOKAmSyaWWz/2VdiOARS9Vum6cEHCQiGCuzuAhnT3N1KnSmUXtazrz3lUOx/QlY2tEfX3Bc3irrfQwMsH7h13XRDc03gjWhOJ/gjwa0fBetO9Pq8ISWWEPGs7YyOVnHUhEYzqBKeWlEsCTD0mAYraC6hB7XUlstj9UKM9KL57cdm+nO8ZBNhIpzWd1kumtoWwqD9V4CxDCM0hH91ZTa41/3WW4ZR+lPyLNOCS8v43CWTCSMuH1IHoTVTgTb63ZhOOFn8qGECvCOuta+CpSg2SnkJhv+V5aOy9M389vXY0iYG3m/m/cjwSSbw876i7Rivt1E+WOLXlrZtrjtzGoA4xZgr+xK4kr6a+wiLEF3sw//EU9c+MZuISEHpR8KefukAyVMkQn0K3eStdO/6iZ7zKjfD8ojgrjmxIbrF08pmEgnem1QHrMd5EQdX5r482Y8ognG0Bypi55c+cWEdZI=
# DOCKER_PASS
- secure: ZoHdW7R+ynb0RUulMcM+b1I1DWePaIcJY2/ELvz5PaxySMAyqeTNnIVlsVCdnuKB77IhWohEk+WAHRGRBwI+ZzDryZ1ET/Gh1bZ44tTvH9x9eos++QuQidzlyVs4pPwRe2ZTXFsHucsWldAr3gfAqeqgTrcrsMKbfNQ439nmrQxlitgkqApYZTWX2Xa1wh/Ea6WUkDONd5n4xvvOhQCQuWR1GQI+I5JZAnBb3Vt2kINzKzVHGV8tFDD8mxSST1STdzOhRL4khyVHg7Z31Ylln6Mg4vjbQHsw/qEmfeqgJDVnEaV23l6jt2eBhxtMo7IQLjELVNMA1aOjR2aDKfdYxitNgBFUmlbe6Dhq/2wuiOdE38GP7UCYcMJiph2AboYw0bfFtG0Cz/Ide6JZW9eX+gDEjBpbktUv9jolZu5DzfsG58FByDaRLOj77Lmv7Ocxq1w9iMQE39H0uXGPcgalomNxhkWS43b8k6FdFI1HakBVB0cYysiC4O0jMRLQGqLZuwdkOS99KFLxauNX1KE2mdGsvYy0NzwCiGlBPIMDPbuWAhLhuypEnWs7RUzB30ckFSN1DqDq5fOFosvz41DstYmVWS7dspx5hMj+zUZ0KeCLO0JL2gQ8Fwfe1VM+p6PD8yFnq77BN16N5DMzpYHV/4CYWQVFwLioygW+DT2Vna0=
before_install:
- docker version
- if [ "$CROSSDOCK" = "1" ]; then make install_docker_ci ; fi
install:
- make bootstrap
script:
- if [ "$CROSSDOCK" != "1" ]; then make test_ci ; fi
- if [ "$COVER" = "1" ]; then coveralls -v ; fi
- if [ "$CROSSDOCK" = "1" ]; then make crossdock ; fi
after_failure:
- timeout 5 if [ "$CROSSDOCK" = "1" ]; then docker-compose -f crossdock/docker-compose.yml logs ; fi
after_success:
- export REPO=jaegertracing/xdock-py
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
- export TAG=`if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH; fi`
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, PR=$PR, BRANCH=$BRANCH, TAG=$TAG"
- if [ "$BRANCH" == "master" ] && [ "$CROSSDOCK" == "1" ]; then echo 'upload to Docker Hub'; else echo 'skip docker upload for PR'; exit 0; fi
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker build -f crossdock/Dockerfile -t $REPO:$COMMIT .
- docker tag $REPO:$COMMIT $REPO:$TAG
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $REPO