2017-04-25 12:52:01 +00:00
|
|
|
language: java
|
|
|
|
|
2019-03-30 23:45:15 +00:00
|
|
|
jdk:
|
|
|
|
- openjdk8
|
|
|
|
|
2017-04-25 12:52:01 +00:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2020-04-12 14:58:31 +00:00
|
|
|
dist: xenial
|
|
|
|
|
|
|
|
os: linux
|
|
|
|
|
2019-03-30 23:45:15 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2019-09-16 13:05:58 +00:00
|
|
|
- name: docker-tag
|
2020-04-12 14:58:31 +00:00
|
|
|
if: (tag IS present) AND (type != pull_request)
|
2019-03-30 23:45:15 +00:00
|
|
|
- name: docker-push
|
2019-09-25 15:49:20 +00:00
|
|
|
if: (branch = master) AND (type != pull_request)
|
2017-10-20 18:21:16 +00:00
|
|
|
|
2019-03-30 23:45:15 +00:00
|
|
|
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
|
2020-04-12 14:58:31 +00:00
|
|
|
token: "$GITHUB_TOKEN"
|
2019-03-30 23:45:15 +00:00
|
|
|
file: "target/plantuml-${TRAVIS_BRANCH}.war"
|
2020-05-11 06:31:51 +00:00
|
|
|
skip_cleanup: true
|
2020-05-01 20:43:22 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2019-09-16 13:05:58 +00:00
|
|
|
|
|
|
|
- stage: docker-tag
|
2020-04-12 14:58:31 +00:00
|
|
|
name: jetty-tag
|
2019-09-16 13:05:58 +00:00
|
|
|
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
|
2020-04-12 14:58:31 +00:00
|
|
|
name: tomcat-tag
|
2019-09-16 13:05:58 +00:00
|
|
|
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
|
|
|
|
|
2019-03-30 23:45:15 +00:00
|
|
|
- stage: docker-push
|
2020-04-12 14:58:31 +00:00
|
|
|
name: jetty-push
|
2019-03-31 22:26:57 +00:00
|
|
|
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
|
2019-03-30 23:45:15 +00:00
|
|
|
- stage: docker-push
|
2020-04-12 14:58:31 +00:00
|
|
|
name: tomcat-push
|
2019-03-31 22:26:57 +00:00
|
|
|
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
|