update jetty and tomcat to latest version
This commit is contained in:
78
.github/workflows/docker.yml
vendored
Normal file
78
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Main
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Docker tomcat meta
|
||||
id: docker_meta_tomcat
|
||||
uses: crazy-max/ghaction-docker-meta@v3
|
||||
with:
|
||||
flavor: |
|
||||
latest=false
|
||||
prefix=
|
||||
suffix=
|
||||
images: plantuml/plantuml-server
|
||||
tags: |
|
||||
type=semver,pattern=tomcat-{{raw}}
|
||||
type=raw,value=tomcat
|
||||
|
||||
- name: Docker jetty meta
|
||||
id: docker_meta_jetty
|
||||
uses: crazy-max/ghaction-docker-meta@v3
|
||||
with:
|
||||
flavor: |
|
||||
latest=true
|
||||
prefix=
|
||||
suffix=
|
||||
images: plantuml/plantuml-server
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
type=semver,pattern=jetty-{{raw}}
|
||||
type=raw,value=jetty
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build & push tomcat
|
||||
id: docker_build_tomcat
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.tomcat
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ steps.docker_meta_tomcat.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_tomcat.outputs.labels }}
|
||||
|
||||
- name: Build & push jetty
|
||||
id: docker_build_jetty
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.jetty
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ steps.docker_meta_jetty.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_jetty.outputs.labels }}
|
||||
149
.github/workflows/main.yml
vendored
149
.github/workflows/main.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-jdk11:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -15,87 +15,98 @@ jobs:
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "adopt"
|
||||
java-version: "8"
|
||||
distribution: "zulu"
|
||||
java-version: 11
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: build with maven
|
||||
run: mvn --batch-mode --define java.net.useSystemProxies=true package
|
||||
|
||||
- name: get tag name
|
||||
id: version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
|
||||
|
||||
- name: build with maven
|
||||
run: mvn --batch-mode --define java.net.useSystemProxies=true package
|
||||
|
||||
- name: create renamed build
|
||||
run: cp target/plantuml.war target/plantuml-${{ steps.version.outputs.VERSION }}.war
|
||||
|
||||
- name: build with maven (including the apache-jsp artifact)
|
||||
run: mvn --batch-mode --define java.net.useSystemProxies=true -Dapache-jsp.scope=compile package
|
||||
|
||||
- name: create renamed build (including the apache-jsp artifact)
|
||||
run: cp target/plantuml.war target/plantuml-jsp-${{ steps.version.outputs.VERSION }}.war
|
||||
|
||||
- name: temporarily save generated war files
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: war-jre11
|
||||
path: target/plantuml*-${{ steps.version.outputs.VERSION }}.war
|
||||
|
||||
build-jdk8:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: 8
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: get tag name
|
||||
id: version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
|
||||
|
||||
- name: Remove test code (not java 8 compatible)
|
||||
run: rm -rf src/test
|
||||
|
||||
- name: build with maven
|
||||
run: mvn --batch-mode -f pom.jdk8.xml --define java.net.useSystemProxies=true package
|
||||
|
||||
- name: create renamed build
|
||||
run: cp target/plantuml.war target/plantuml-jre8-${{ steps.version.outputs.VERSION }}.war
|
||||
|
||||
- name: build with maven (including the apache-jsp artifact)
|
||||
run: mvn --batch-mode -f pom.jdk8.xml --define java.net.useSystemProxies=true -Dapache-jsp.scope=compile package
|
||||
|
||||
- name: create renamed build (including the apache-jsp artifact)
|
||||
run: cp target/plantuml.war target/plantuml-jre8-jsp-${{ steps.version.outputs.VERSION }}.war
|
||||
|
||||
- name: temporarily save generated war files
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: war-jre8
|
||||
path: target/plantuml*-${{ steps.version.outputs.VERSION }}.war
|
||||
|
||||
publish-releases:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-jdk11
|
||||
- build-jdk8
|
||||
steps:
|
||||
- name: retrieve generated war files (jre8)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: war-jre8
|
||||
path: artifacts
|
||||
|
||||
- name: retrieve generated war files (jre11)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: war-jre11
|
||||
path: artifacts
|
||||
|
||||
- name: display structure of downloaded files
|
||||
run: ls -lah artifacts
|
||||
|
||||
- name: upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: target/plantuml-${{ steps.version.outputs.VERSION }}.war
|
||||
asset_name: plantuml-${{ steps.version.outputs.VERSION }}.war
|
||||
file: artifacts/plantuml*.war
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
||||
- name: Docker tomcat meta
|
||||
id: docker_meta_tomcat
|
||||
uses: crazy-max/ghaction-docker-meta@v3
|
||||
with:
|
||||
flavor: |
|
||||
latest=false
|
||||
prefix=
|
||||
suffix=
|
||||
images: plantuml/plantuml-server
|
||||
tags: |
|
||||
type=semver,pattern=tomcat-{{raw}}
|
||||
type=raw,value=tomcat
|
||||
|
||||
- name: Docker jetty meta
|
||||
id: docker_meta_jetty
|
||||
uses: crazy-max/ghaction-docker-meta@v3
|
||||
with:
|
||||
flavor: |
|
||||
latest=true
|
||||
prefix=
|
||||
suffix=
|
||||
images: plantuml/plantuml-server
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
type=semver,pattern=jetty-{{raw}}
|
||||
type=raw,value=jetty
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build & push tomcat
|
||||
id: docker_build_tomcat
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.tomcat
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ steps.docker_meta_tomcat.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_tomcat.outputs.labels }}
|
||||
|
||||
- name: Build & push jetty
|
||||
id: docker_build_jetty
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.jetty
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ steps.docker_meta_jetty.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_jetty.outputs.labels }}
|
||||
file_glob: true
|
||||
|
||||
4
.github/workflows/pages.yml
vendored
4
.github/workflows/pages.yml
vendored
@@ -19,8 +19,8 @@ jobs:
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "adopt"
|
||||
java-version: "8"
|
||||
distribution: "zulu"
|
||||
java-version: 11
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
|
||||
237
.github/workflows/tests.yml
vendored
237
.github/workflows/tests.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
test-mvn-livecycle:
|
||||
test-java-8-war-generation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -14,65 +14,110 @@ jobs:
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "adopt"
|
||||
java-version: "8"
|
||||
distribution: "zulu"
|
||||
java-version: 8
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Remove test code (not java 8 compatible)
|
||||
run: rm -rf src/test
|
||||
|
||||
- name: Generate war file (including apache-jsp artifact)
|
||||
run: mvn --batch-mode -f pom.jdk8.xml -D java.net.useSystemProxies=true -Dapache-jsp.scope=compile clean package
|
||||
|
||||
- name: Generate war file
|
||||
run: mvn --batch-mode -f pom.jdk8.xml -D java.net.useSystemProxies=true clean package
|
||||
|
||||
- name: temporarily save generated files
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: war-jre8
|
||||
path: target/plantuml.war
|
||||
retention-days: 1
|
||||
|
||||
test-java-8-war:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-java-8-war-generation
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: retrieve generated files (jre8)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: war-jre8
|
||||
path: artifacts
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Prepare jetty-runner tests
|
||||
run: mvn --batch-mode clean package
|
||||
|
||||
- name: Start jetty server over jetty-runner
|
||||
run: java -jar target/dependency/jetty-runner.jar --config src/main/config/jetty.xml --path /plantuml artifacts/plantuml.war &
|
||||
|
||||
- name: Wait 5 seconds (to let jetty-runner start the jetty server)
|
||||
run: sleep 5s
|
||||
|
||||
- name: Run tests against "mvn jetty:run" server
|
||||
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
|
||||
test-mvn-livecycle:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Lifecycle - Step 1/8 - mvn clean
|
||||
run: mvn clean
|
||||
run: mvn --batch-mode clean
|
||||
|
||||
- name: Lifecycle - Step 2/8 - mvn validate
|
||||
run: mvn validate
|
||||
run: mvn --batch-mode validate
|
||||
|
||||
- name: Lifecycle - Step 3/8 - mvn compile
|
||||
run: mvn compile
|
||||
run: mvn --batch-mode compile
|
||||
|
||||
- name: Lifecycle - Step 4/8 - mvn test (with skipTests=true)
|
||||
run: mvn test
|
||||
run: mvn --batch-mode test
|
||||
|
||||
- name: Lifecycle - Step 5/8 - mvn package
|
||||
run: mvn package
|
||||
run: mvn --batch-mode package
|
||||
|
||||
- name: Lifecycle - Step 6/8 - mvn verify
|
||||
run: mvn verify
|
||||
run: mvn --batch-mode verify
|
||||
|
||||
- name: Lifecycle - Step 7/8 - mvn install
|
||||
run: mvn install
|
||||
run: mvn --batch-mode install
|
||||
|
||||
- name: Lifecycle - Step 8/8 - mvn site
|
||||
run: mvn site
|
||||
|
||||
# test-embedded:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: test-mvn-livecycle
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
|
||||
# - uses: actions/setup-java@v2
|
||||
# with:
|
||||
# distribution: "adopt"
|
||||
# java-version: "8"
|
||||
# check-latest: true
|
||||
# cache: "maven"
|
||||
|
||||
# - name: Prepare embedded tests - Step 1/3 - mvn clean
|
||||
# run: mvn clean
|
||||
run: mvn --batch-mode site
|
||||
|
||||
# - name: Prepare embedded tests - Step 2/3 - mvn compile
|
||||
# run: mvn compile
|
||||
|
||||
# - name: Prepare embedded tests - Step 3/3 - mvn test (with skipTests=true)
|
||||
# run: mvn test
|
||||
|
||||
# - name: Run tests against jetty embedded server
|
||||
# run: mvn test -DskipTests=false
|
||||
|
||||
test-jetty:
|
||||
test-embedded:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-mvn-livecycle
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -80,19 +125,94 @@ jobs:
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "adopt"
|
||||
java-version: "8"
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Prepare external tests - Step 1/3 - mvn clean
|
||||
run: mvn clean
|
||||
|
||||
- name: Prepare external tests - Step 2/3 - mvn compile
|
||||
run: mvn compile
|
||||
- name: Run tests against jetty embedded server
|
||||
run: mvn --batch-mode clean test -DskipTests=false
|
||||
|
||||
- name: Prepare external tests - Step 3/3 - mvn test (with skipTests=true)
|
||||
run: mvn test
|
||||
test-mvn-jetty-run:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-mvn-livecycle
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Prepare "mvn jetty:run" tests
|
||||
run: mvn --batch-mode clean test
|
||||
|
||||
- name: Start jetty server over maven
|
||||
run: mvn --batch-mode jetty:run &
|
||||
|
||||
- name: Wait 10 seconds (to let maven start the jetty server)
|
||||
run: sleep 10s
|
||||
|
||||
- name: Run tests against "mvn jetty:run" server
|
||||
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
|
||||
test-jetty-runner:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-mvn-livecycle
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Prepare jetty-runner tests
|
||||
run: mvn --batch-mode clean package
|
||||
|
||||
- name: Start jetty server over jetty-runner
|
||||
run: java -jar target/dependency/jetty-runner.jar --config src/main/config/jetty.xml --path /plantuml target/plantuml.war &
|
||||
|
||||
- name: Wait 5 seconds (to let jetty-runner start the jetty server)
|
||||
run: sleep 5s
|
||||
|
||||
- name: Run tests against "mvn jetty:run" server
|
||||
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
|
||||
test-jetty:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-mvn-livecycle
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Prepare external tests
|
||||
run: mvn --batch-mode clean test
|
||||
|
||||
- name: Build the jetty docker stack
|
||||
run: |
|
||||
@@ -103,11 +223,14 @@ jobs:
|
||||
run: docker ps
|
||||
|
||||
- name: run tests against jetty docker image
|
||||
run: mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
|
||||
test-tomcat:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-mvn-livecycle
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [ 11, 17 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -115,19 +238,13 @@ jobs:
|
||||
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: "adopt"
|
||||
java-version: "8"
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
cache: "maven"
|
||||
|
||||
- name: Prepare external tests - Step 1/3 - mvn clean
|
||||
run: mvn clean
|
||||
|
||||
- name: Prepare external tests - Step 2/3 - mvn compile
|
||||
run: mvn compile
|
||||
|
||||
- name: Prepare external tests - Step 3/3 - mvn test (with skipTests=true)
|
||||
run: mvn test
|
||||
- name: Prepare external tests
|
||||
run: mvn --batch-mode clean test
|
||||
|
||||
- name: Build the tomcat docker stack
|
||||
run: |
|
||||
@@ -138,4 +255,4 @@ jobs:
|
||||
run: docker ps
|
||||
|
||||
- name: run tests against tomcat docker image
|
||||
run: mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
|
||||
Reference in New Issue
Block a user