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

Commit

Permalink
Add travis_wait to docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
thuningxu committed Apr 21, 2017
1 parent 1a3a1f4 commit d6d6d64
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .travis.yml
Expand Up @@ -74,20 +74,22 @@ script:

after_success:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- 'if [ "$BRANCH" == "master" ]; then
- 'if [ "$BRANCH" == "docker" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS;
export TAG=latest;
export TAG=docker-test;
export REPO=ubercherami/cherami-server-standalone;
echo "Building docker image for TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, PR=$PR, BRANCH=$BRANCH, TAG=$TAG";
travis_wait 30 docker build -f docker/standalone/Dockerfile -t $REPO:$COMMIT -t $REPO:$TAG -t $REPO:travis-$TRAVIS_BUILD_NUMBER docker/standalone/;
docker push $REPO;
echo "Pushing $REPO"
travis_wait 30 time docker push $REPO;
fi'
- 'if [ "$BRANCH" == "master" ]; then
- 'if [ "$BRANCH" == "docker" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS;
export TAG=latest;
export TAG=docker-test;
export REPO=ubercherami/cherami-server;
echo "Building docker image for TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, PR=$PR, BRANCH=$BRANCH, TAG=$TAG";
travis_wait 30 docker build -f docker/server/Dockerfile -t $REPO:$COMMIT -t $REPO:$TAG -t $REPO:travis-$TRAVIS_BUILD_NUMBER docker/server/;
docker push $REPO;
echo "Pushing $REPO"
travis_wait 30 time docker push $REPO;
fi'

0 comments on commit d6d6d64

Please sign in to comment.