-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (29 loc) · 2.3 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
sudo: required
install:
- sudo pip install -r requirements.txt
env:
global:
- secure: "lkQc1p3z8Q0VnVC/xSmwhOaeWS3ZhzthqjRBX0ad3qrx2GL6fWTfm22kcUocXblfBjv/tozif5la7qqSuvE8oEG0IkDz81DZDJM33MeWwyntrH28EdARTZ705YeW5fnqQVwXZZsoVtsoYHeUOPvt5XskYkiUyTxdI5eUBiIN9D1sCIg6zRpVu0yQ8d8VDfOaEVt727Qx6gngraq7CB7GENsxTg8ari6nggujxyrQ0JHPI5nefYWVdBlE7zMeOLEdy7qU33XMdGHGWBmfqf/+sCkotmSrbBvFgksQujPfXdQSwqOIRmQbzkd+2tloiwkP5O8VsUAA/VKbK6O9W6y7FtArpedubVSZxKfVma+1dI0NvChLOyHMQU7XL06iMVPkmaJGnxlFxA0jzB0oOZDlE2Kw6yHtImoLc93QwtjqQ5yyeyA4UaqIPX4Cx9DeBkhr/c8krHD7OJJcXHHF4M/TbZ+4r1oNTzM3noE8OimaGZc05G06IAIexFB3Y/E08JS9UFecCZ68XRfNO/sE2Scz+PLH3XS6C6f05sdL5Lo9rFybZU6mPJkvnwWviPOIaybTsOLCzqIDaL2Xjw3+ubRe+F8kKjUoH0z+xjJUok1WcjuLy61laQENYzWrbr97DRgxvj5p9aOlLpSv7NUKu1SP+ub2nslBSsU0dmhrFeHvfD8="
- secure: "I8PVi31OaUVFPVhpHjocDqwmranx+0XzFImX8NeWvq2ACIuDJgozXEqHF/WRVVYn+i3ueU4VxMaS+0VE5/tPROEOaL1fIy6kjhnWIGyQtYq+QWRXsAspTR3mGbj/QSDmD5Wr8NwkR8QJqvM/TejKrl+ZZM9mIY9Hqwg77ssVXIZM411fJccbYG6t7ieffVbRR1fBc+YTJaJ9Jyv0HHTCWnJ8sqiJ8D0XU8Pc/A8wlc6WZPywP+Zom6aMkewLP2Kq8RLhcx/RO/+VDjKW8lOP9RZ15SJ3IZZ47cbw7BOFTDJXoTC4wMVaAjcLsI/g3sSkpRXmhNpsydp9FA4Mt7Vv5q6Qc+kdF6SfmK95NQ1VBDmx19dFBTXq+JAlm1UxetqU5hqJ8+00zIckcFGcU+D/XmTaXrgfnzTwFAAz4LHcdo/ayrgss6w0g+OAvOUoJlqVBX7MiD2BwSQQd7YYIYaKW6LkvRQWphjeSvXz6nlxgpdR0kDL+FwzsTxXUryhslUdLSFM1u/zbMopsCmsurXN0oqa9ypV9qhfmxfC77ktGFSFLurJz7egQMjlxPLoeDFF+IDp68HfUSzrITQ/geb/7tOTwCX5gEwAvyBhbxITRSGNEsnYNz3BsHwLuQUn9JpCnnWVnVds5IwmjCGmMMMpU8jZs5e57p84MAe7bqSBC6U="
script:
- source define_repo.sh
- sudo bash ./build_run_test.sh
after_success:
- IMAGE=`sudo docker ps --latest --format '{{ .Image }}'` # TODO: with more containers, can't rely on ordering
- tag_push() { echo "Tagging into $2"; sudo docker tag $1 $2; sudo docker push $2; }
- sudo docker login -u $DOCKER_USER -p $DOCKER_PASS
# Always update "latest": the cache will be used for the next build.
- tag_push $IMAGE $REPO
- >
if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then
echo "PR!";
BRANCH=`echo ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} | perl -pne 'chomp;s{.*/}{};s/\W/-/g'`;
tag_push $IMAGE $REPO:$BRANCH;
tag_push $IMAGE $REPO:latest-pr;
fi
- >
if [ ! -z "$TRAVIS_TAG" ]; then
echo "Git tag!";
tag_push $IMAGE $REPO:$TRAVIS_TAG;
tag_push $IMAGE $REPO:latest;
fi