mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-06-06 18:30:51 +00:00
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
This commit is contained in:
parent
448c8f614f
commit
51e0922eea
26
.travis.yml
26
.travis.yml
|
@ -1,17 +1,19 @@
|
||||||
language: java
|
language: java
|
||||||
|
|
||||||
sudo: required
|
|
||||||
|
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk8
|
- openjdk8
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
|
os: linux
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- name: docker-tag
|
- name: docker-tag
|
||||||
if: (tag IS present) AND (branch = master) AND (type != pull_request)
|
if: (tag IS present) AND (type != pull_request)
|
||||||
- name: docker-push
|
- name: docker-push
|
||||||
if: (branch = master) AND (type != pull_request)
|
if: (branch = master) AND (type != pull_request)
|
||||||
|
|
||||||
|
@ -23,34 +25,28 @@ jobs:
|
||||||
before_deploy: cp target/plantuml.war target/plantuml-${TRAVIS_BRANCH}.war
|
before_deploy: cp target/plantuml.war target/plantuml-${TRAVIS_BRANCH}.war
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: "$GITHUB_TOKEN"
|
token: "$GITHUB_TOKEN"
|
||||||
file: "target/plantuml-${TRAVIS_BRANCH}.war"
|
file: "target/plantuml-${TRAVIS_BRANCH}.war"
|
||||||
skip_cleanup: true
|
cleanup: true
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
- stage: docker-tag
|
- stage: docker-tag
|
||||||
name: jetty
|
name: jetty-tag
|
||||||
script:
|
script:
|
||||||
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
|
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
- docker build --pull -t plantuml/plantuml-server:jetty-$TRAVIS_TAG -f Dockerfile.jetty .
|
- docker build --pull -t plantuml/plantuml-server:jetty-$TRAVIS_TAG -f Dockerfile.jetty .
|
||||||
- docker push plantuml/plantuml-server:jetty-$TRAVIS_TAG
|
- docker push plantuml/plantuml-server:jetty-$TRAVIS_TAG
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
- stage: docker-tag
|
- stage: docker-tag
|
||||||
name: tomcat
|
name: tomcat-tag
|
||||||
script:
|
script:
|
||||||
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
|
- if [ -z "$TRAVIS_TAG" ]; then exit 0; fi
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
- docker build --pull -t plantuml/plantuml-server:tomcat-$TRAVIS_TAG -f Dockerfile.tomcat .
|
- docker build --pull -t plantuml/plantuml-server:tomcat-$TRAVIS_TAG -f Dockerfile.tomcat .
|
||||||
- docker push plantuml/plantuml-server:tomcat-$TRAVIS_TAG
|
- docker push plantuml/plantuml-server:tomcat-$TRAVIS_TAG
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
|
|
||||||
- stage: docker-push
|
- stage: docker-push
|
||||||
name: jetty
|
name: jetty-push
|
||||||
script:
|
script:
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
- docker build --pull -t plantuml/plantuml-server:jetty -f Dockerfile.jetty .
|
- docker build --pull -t plantuml/plantuml-server:jetty -f Dockerfile.jetty .
|
||||||
|
@ -58,7 +54,7 @@ jobs:
|
||||||
- docker push plantuml/plantuml-server:jetty
|
- docker push plantuml/plantuml-server:jetty
|
||||||
- docker push plantuml/plantuml-server:latest
|
- docker push plantuml/plantuml-server:latest
|
||||||
- stage: docker-push
|
- stage: docker-push
|
||||||
name: tomcat
|
name: tomcat-push
|
||||||
script:
|
script:
|
||||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
- docker build --pull -t plantuml/plantuml-server:tomcat -f Dockerfile.tomcat .
|
- docker build --pull -t plantuml/plantuml-server:tomcat -f Dockerfile.tomcat .
|
||||||
|
|
Loading…
Reference in New Issue
Block a user