1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-12-22 16:58:54 +00:00
plantuml-server/.travis.yml
John Jarvis 51e0922eea Fixes docker-tag and docker-push stages in travis-ci
* Sets dist/os to the defaults
* Does not check for branch is master and a tag since these will never be true
* Removes on: tags=true
* Removes deprecated: sudo: required
* Replaces deprecated `api_token` with `token`
* Uses unique names so travis doesn't warn
2020-04-12 17:33:33 +02:00

62 lines
2.1 KiB
YAML

language: java
jdk:
- openjdk8
services:
- docker
dist: xenial
os: linux
stages:
- build
- name: docker-tag
if: (tag IS present) AND (type != pull_request)
- name: docker-push
if: (branch = master) AND (type != pull_request)
jobs:
include:
- stage: build
name: war
script: mvn --batch-mode --define java.net.useSystemProxies=true package
before_deploy: cp target/plantuml.war target/plantuml-${TRAVIS_BRANCH}.war
deploy:
provider: releases
token: "$GITHUB_TOKEN"
file: "target/plantuml-${TRAVIS_BRANCH}.war"
cleanup: true
- stage: docker-tag
name: jetty-tag
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
- stage: docker-tag
name: tomcat-tag
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
- stage: docker-push
name: jetty-push
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
- docker push plantuml/plantuml-server:jetty
- docker push plantuml/plantuml-server:latest
- stage: docker-push
name: tomcat-push
script:
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker build --pull -t plantuml/plantuml-server:tomcat -f Dockerfile.tomcat .
- docker push plantuml/plantuml-server:tomcat