From 5c8a8b2179fed45828fde75f72fc3a632841d6c1 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Mon, 28 Dec 2015 13:01:28 -0800 Subject: [PATCH] deploy: Use travis deployment conditionals --- .travis.yml | 4 +++- scripts/travis-docker-push | 15 +++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index a9ee8b4c..520d2d77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 \ No newline at end of file diff --git a/scripts/travis-docker-push b/scripts/travis-docker-push index 83099b24..b5551048 100755 --- a/scripts/travis-docker-push +++ b/scripts/travis-docker-push @@ -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 \ No newline at end of file +./build +docker info +./docker-build +docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p=$DOCKER_PASSWORD quay.io +./docker-push