Skip to content
Permalink
Browse files

Make travis show green for external contributors.

If the build isn't allowed access to secure variables, don't try to run the docker build.
  • Loading branch information...
ndmckinley authored and riccardomurri committed Mar 8, 2019
1 parent 0ef9783 commit f554d92518217d96eddee1994899c55584efe529
Showing with 1 addition and 0 deletions.
  1. +1 −0 .travis.yml
@@ -21,6 +21,7 @@ sudo: false

after_success:
- if [ $(echo "$TRAVIS_PYTHON_VERSION" | cut -d. -f1-2) != '2.7' ]; then echo "Only building on Py2.7, this is $TRAVIS_PYTHON_VERSION"; exit 0; fi
- if [ -z "$DOCKER_USER" ]; then echo "Untrusted build - cannot access docker environment variables."; exit 0; fi
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
- export BRANCH=$(echo "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" | cut -c-8)
- export COMMIT=$(echo "${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}" | cut -c-8)

0 comments on commit f554d92

Please sign in to comment.
You can’t perform that action at this time.