mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-22 16:58:54 +00:00
build the war file with travis.
automatically add the generated war to github releases. split the docker build in stages to run in parallel and only if the build succeeded.
This commit is contained in:
parent
bd49d5cf7f
commit
c4ace921cd
55
.travis.yml
55
.travis.yml
@ -2,22 +2,47 @@ language: java
|
|||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
|
jdk:
|
||||||
|
- openjdk8
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
after_success:
|
stages:
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- build
|
||||||
- if [ "$TRAVIS_BRANCH" == "master" ]; then
|
- name: docker-push
|
||||||
|
if: branch = master
|
||||||
|
|
||||||
docker build --pull -t plantuml/plantuml-server:jetty -f Dockerfile.jetty . ;
|
jobs:
|
||||||
docker build --pull -t plantuml/plantuml-server:tomcat -f Dockerfile.tomcat . ;
|
include:
|
||||||
docker tag plantuml/plantuml-server:jetty plantuml/plantuml-server:latest ;
|
- stage: build
|
||||||
|
name: war
|
||||||
docker push plantuml/plantuml-server:tomcat;
|
script: mvn --batch-mode --define java.net.useSystemProxies=true package
|
||||||
docker push plantuml/plantuml-server:jetty;
|
before_deploy: cp target/plantuml.war target/plantuml-${TRAVIS_BRANCH}.war
|
||||||
docker push plantuml/plantuml-server:latest;
|
deploy:
|
||||||
|
provider: releases
|
||||||
docker build --pull -t plantuml/plantuml-server:armv8a -f Dockerfile.armv8a . ;
|
api_key: "$GITHUB_TOKEN"
|
||||||
docker push plantuml/plantuml-server:armv8a;
|
file: "target/plantuml-${TRAVIS_BRANCH}.war"
|
||||||
|
skip_cleanup: true
|
||||||
fi
|
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 ;
|
||||||
|
docker push plantuml/plantuml-server:jetty;
|
||||||
|
docker push plantuml/plantuml-server:latest;
|
||||||
|
- stage: docker-push
|
||||||
|
name: tomcat
|
||||||
|
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;
|
||||||
|
- stage: docker-push
|
||||||
|
name: armv8a
|
||||||
|
script: >
|
||||||
|
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
|
docker build --pull -t plantuml/plantuml-server:armv8a -f Dockerfile.armv8a . ;
|
||||||
|
docker push plantuml/plantuml-server:armv8a;
|
||||||
|
Loading…
Reference in New Issue
Block a user