Skip to content

Commit

Permalink
Update travis-ci to build and push releases to DockerHub (#22)
Browse files Browse the repository at this point in the history
* test python 3.7

* push all tagged releases to dockerhub with travis-ci
  • Loading branch information
willgraf authored Jul 31, 2019
1 parent f2b1ea6 commit 249b88c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: false
dist: trusty
sudo: true
dist: xenial

git:
depth: false
Expand All @@ -10,6 +10,7 @@ python:
- 2.7
- 3.5
- 3.6
- 3.7

cache: pip

Expand All @@ -23,13 +24,14 @@ script:
jobs:
include:
- stage: deploy
if: (branch = master OR branch =~ ^r[0-9]+.[0-9]+) AND type != pull_request
if: tag IS present
python: 3.6
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t "$TRAVIS_REPO_SLUG" .
- docker images
- docker tag "$TRAVIS_REPO_SLUG" "$TRAVIS_REPO_SLUG":latest
- if [[ "$TRAVIS_BRANCH" != "master" ]] ; then docker tag "$TRAVIS_REPO_SLUG" "$TRAVIS_REPO_SLUG":"${TRAVIS_BRANCH#r}" ; fi
- docker tag "$TRAVIS_REPO_SLUG" "$TRAVIS_REPO_SLUG":"${TRAVIS_TAG}"
- docker push "$TRAVIS_REPO_SLUG"

after_success:
Expand Down

0 comments on commit 249b88c

Please sign in to comment.