-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
27 lines (27 loc) · 1.56 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
sudo: required
language: cpp
services:
- docker
notifications:
email: false
slack:
secure: gbC/4OXc8gvzHeqYcaHKhtq5AJUgD9YZsdp8ArxvTH0MizdjU1WTDDn7VvRPVJEwJECeldRadK9MzXrYMSOhy5pLL3Oj2ITpwmeYGK0rQEADGNacRloQpLNlrAyI+rlRXciLGvnUDdd4RNLh8Sf89606Vrw/vsGtO9HfQYYN/mDqlXEaucD2nAe3/FUsqfZGwpnNlgjteXVqTWaMWzxif4BlaBnVTFKrL0+dMN4esuvH96b6cgLp/ejgR+VmR09JYia7WQPlGm5Ck0SNGbO80cyoiYuOUgNAKVi65Zg9+kHIVXHDG2K4wxUyk3kTbPK2NR62I/jOcykraTEAh5PqdTx4I5UuYJtd8orjh3vPo8hzqGXXXdd31k1cjHpHN0Y4BDXUOXdqaRyZHrFH+zpe7ty8y4Ywq3Q0/5I6dZvJAphyz200xxtc9d6S2PPvLQkoUjpJFg4OM6c1B0trGAr2RjfoAVxPJQk/t+jzrC0ln7sLeegkR9kcLEhz/2QyxrWEomzlCoQorunki/414WczqrpGw9UQ/k9zxuCd0vCZicRatd1vzS7MQ10kGZoZCmsp+hxp9Qolz2PIN+cGKhrXCEZMcEtDtZgmDN7D9XTUV6WWqTzK3evWidempWiyetJ6z5cAg1u3YbJKgU9V3FQsY4Im3HQ5xYSR3tbxpo4L798=
# install:
#-
script:
- GIT_COMMIT="$(git rev-parse HEAD)"
- echo "GIT_COMMIT=$GIT_COMMIT"
- docker build -t pyprob/pyprob_cpp --build-arg GIT_COMMIT=$GIT_COMMIT .
after_success:
- export CURRENT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH;
else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, TRAVIS_TAG=$TRAVIS_TAG, CURRENT_BRANCH=$CURRENT_BRANCH"
- if [[ "$CURRENT_BRANCH" == "master" ]] || [[ -n "$TRAVIS_TAG" ]]; then
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD;
docker tag pyprob/pyprob_cpp pyprob/pyprob_cpp:latest;
docker push pyprob/pyprob_cpp:latest;
if [[ -n "$TRAVIS_TAG" ]]; then
docker tag pyprob/pyprob_cpp pyprob/pyprob_cpp:$TRAVIS_TAG;
docker push pyprob/pyprob_cpp:$TRAVIS_TAG;
fi
fi