Skip to content

Commit

Permalink
Merge pull request #118 from jarv/jarv/fix-tagging
Browse files Browse the repository at this point in the history
Creates a docker tagged image for jetty and tomcat
  • Loading branch information
arnaudroques authored Sep 16, 2019
2 parents eedd469 + 10707c4 commit 513453e
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:

stages:
- build
- name: docker-tag
if: tag IS present
- name: docker-push
if: branch = master

Expand All @@ -26,16 +28,33 @@ jobs:
skip_cleanup: true
on:
tags: true

- stage: docker-tag
name: jetty
script:
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker build --pull -t plantuml/plantuml-server:jetty-$TRAVIS_TAG -f Dockerfile.jetty .
- docker push plantuml/plantuml-server:jetty-$TRAVIS_TAG
on:
tags: true

- stage: docker-tag
name: tomcat
script:
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker build --pull -t plantuml/plantuml-server:tomcat-$TRAVIS_TAG -f Dockerfile.tomcat .
- docker push plantuml/plantuml-server:tomcat-$TRAVIS_TAG
on:
tags: true

- stage: docker-push
name: jetty
script:
- 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
Expand Down

0 comments on commit 513453e

Please sign in to comment.