Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
only push to docker hub from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
datoug committed Feb 8, 2017
1 parent c229e86 commit d73067e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .travis.yml
Expand Up @@ -47,12 +47,14 @@ script:
- EMBEDROCKSDB=0 make cover_ci

after_success:
- export REPO=ubercherami/cherami-server-standalone
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; 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"
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker build -f docker/standalone/Dockerfile -t $REPO:$COMMIT docker/standalone/
- docker tag $REPO:$COMMIT $REPO:$TAG
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $REPO
- 'if [ "$BRANCH" == "master" ]; then
export REPO=ubercherami/cherami-server-standalone;
export TAG=latest;
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, PR=$PR, BRANCH=$BRANCH, TAG=$TAG";
docker login -u $DOCKER_USER -p $DOCKER_PASS;
docker build -f docker/standalone/Dockerfile -t $REPO:$COMMIT docker/standalone/;
docker tag $REPO:$COMMIT $REPO:$TAG;
docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER;
docker push $REPO;
fi'

0 comments on commit d73067e

Please sign in to comment.