deploy: Use travis deployment conditionals

This commit is contained in:
Dalton Hubble
2015-12-28 13:01:28 -08:00
parent 61a844adea
commit 5c8a8b2179
2 changed files with 8 additions and 11 deletions

View File

@@ -16,8 +16,10 @@ script:
deploy:
provider: script
script: scripts/travis-docker-push
skip_cleanup: true
on:
branch: master
skip_cleanup: true
go: '1.5'
condition: "$TRAVIS_PULL_REQUEST = false"
notifications:
email: false

View File

@@ -1,13 +1,8 @@
#!/bin/bash -e
# Travis Deploy Docker Push
if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_GO_VERSION" == "1.5" ]]; then
./build
docker info
./docker-build
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p=$DOCKER_PASSWORD quay.io
./docker-push
else
echo "Skipping Docker image push."
echo "PR: $TRAVIS_PULL_REQUEST Go: $TRAVIS_GO_VERSION"
fi
./build
docker info
./docker-build
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p=$DOCKER_PASSWORD quay.io
./docker-push