From fffa69238cc2e3274540df9f46dc4c8df5f9a5b1 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Fri, 6 Sep 2019 16:28:10 +0200 Subject: [PATCH] Tags the docker image if there is a git tag --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 79b69e4..e0ef2ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,10 @@ jobs: - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD - docker build --pull -t plantuml/plantuml-server:jetty -f Dockerfile.jetty . - docker tag plantuml/plantuml-server:jetty plantuml/plantuml-server:latest + - if [ -n "$TRAVIS_TAG" ]; then + docker tag plantuml/plantuml-server:jetty plantuml/plantuml-server:$TRAVIS_TAG; + docker push plantuml/plantuml-server:$TRAVIS_TAG; + fi - docker push plantuml/plantuml-server:jetty - docker push plantuml/plantuml-server:latest - stage: docker-push