forked from Ullaakut/RTSPAllTheThings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
19 lines (13 loc) · 902 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
sudo: required
services:
- docker
before_install:
- echo "Testing Docker Hub credentials"
- if [[ "$DOCKER_PASSOWRD" != "" ]]; then docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD; fi
- echo "Docker Hub credentials are working"
script:
- ./build.sh
after_success:
- echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)"
- if [[ "$TRAVIS_BRANCH" == "master" && "$DOCKER_PASSWORD" != "" ]]; then echo -e "Push Container to Docker Hub" && docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD && docker tag rtspatt $DOCKER_REPO:latest && docker push $DOCKER_REPO; fi
- if [[ ("$TRAVIS_BRANCH" == "master" && "DOCKER_PASSWORD" != "" && ! -z "$TRAVIS_TAG") ]]; then echo -e "Push new tag to Docker Hub" && docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD && docker tag rtspatt $DOCKER_REPO:$TRAVIS_TAG && docker push $DOCKER_REPO; fi