diff --git a/.travis.yml b/.travis.yml index b6f2027..da4d286 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -sudo: false -dist: trusty +sudo: true +dist: xenial git: depth: false @@ -10,6 +10,7 @@ python: - 2.7 - 3.5 - 3.6 + - 3.7 cache: pip @@ -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: