Skip to content

Commit

Permalink
update + restructure pom and add missing javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian authored and arnaudroques committed Oct 13, 2021
1 parent 098e630 commit deda3c2
Show file tree
Hide file tree
Showing 18 changed files with 807 additions and 250 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Main

on:
push:
tags:
Expand All @@ -11,6 +12,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-java@v2
with:
distribution: "adopt"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pages

on:
workflow_dispatch:
workflow_run:
workflows:
- Main
types:
- completed

jobs:
pages:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
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: Create GitHub Pages
run: mvn site

- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site
141 changes: 141 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Tests

on:
- push
- pull_request

jobs:
test-mvn-livecycle:
runs-on: ubuntu-latest
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: Lifecycle - Step 1/8 - mvn clean
run: mvn clean

- name: Lifecycle - Step 2/8 - mvn validate
run: mvn validate

- name: Lifecycle - Step 3/8 - mvn compile
run: mvn compile

- name: Lifecycle - Step 4/8 - mvn test (with skipTests=true)
run: mvn test

- name: Lifecycle - Step 5/8 - mvn package
run: mvn package

- name: Lifecycle - Step 6/8 - mvn verify
run: mvn verify

- name: Lifecycle - Step 7/8 - mvn install
run: mvn 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

# - 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:
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 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: Build the jetty docker stack
run: |
docker image build -f Dockerfile.jetty -t plantuml-server:local .
docker run -d -p 8080:8080 -e BASE_URL=plantuml plantuml-server:local
- name: Check running containers
run: docker ps

- name: run tests against jetty docker image
run: mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"

test-tomcat:
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 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: Build the tomcat docker stack
run: |
docker image build -f Dockerfile.tomcat -t plantuml-server:local .
docker run -d -p 8080:8080 -e BASE_URL=plantuml plantuml-server:local
- name: Check running containers
run: docker ps

- name: run tests against tomcat docker image
run: mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"servlet",
"servlets",
"startditaa",
"startuml"
"startuml",
"utxt"
],
"cSpell.allowCompoundWords": true
}
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# PlantUML Server

![workflow status](https://github.com/plantuml/plantuml-server/actions/workflows/main.yml/badge.svg)
[![docker pulls](https://img.shields.io/docker/pulls/plantuml/plantuml-server.svg)](https://hub.docker.com/r/plantuml/plantuml-server)
[![GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007](https://img.shields.io/github/license/plantuml/plantuml-server.svg?color=blue)](https://www.gnu.org/licenses/gpl-3.0)
[![latest tag](https://img.shields.io/github/v/tag/plantuml/plantuml-server)](https://github.com/plantuml/plantuml-server/tags)
![workflow status (Main)](https://github.com/plantuml/plantuml-server/actions/workflows/main.yml/badge.svg)
![workflow status (Tests)](https://github.com/plantuml/plantuml-server/actions/workflows/tests.yml/badge.svg)
![workflow status (Pages)](https://github.com/plantuml/plantuml-server/actions/workflows/pages.yml/badge.svg)
[![docker pulls](https://img.shields.io/docker/pulls/plantuml/plantuml-server.svg?color=blue)](https://hub.docker.com/r/plantuml/plantuml-server)
![Docker Image Size (Jetty)](https://img.shields.io/docker/image-size/plantuml/plantuml-server/jetty?label=jetty%20image%20size)
![Docker Image Size (Tomcat)](https://img.shields.io/docker/image-size/plantuml/plantuml-server/tomcat?label=tomcat%20image%20size)

PlantUML Server is a web application to generate UML diagrams on-the-fly.

Expand Down Expand Up @@ -84,21 +90,21 @@ docker run -d -p 8080:8080 -e THE_ENV_VARIABLE=THE_ENV_VALUE plantuml/plantuml-s

You can set all the following variables:

* `BASE_URL`
* PlantUML Base URL path
* Default value: `ROOT`
* `PLANTUML_LIMIT_SIZE`
* Limits image width and height
* Default value: `4096`
* `GRAPHVIZ_DOT`
* Link to 'dot' executable
* Default value: `/usr/local/bin/dot` or `/usr/bin/dot`
* Limits image width and height
* Default value: `4096`
* `PLANTUML_STATS`
* Set it to `on` to enable [statistics report](https://plantuml.com/statistics-report)
* Default value: `off`
* Set it to `on` to enable [statistics report](https://plantuml.com/statistics-report)
* Default value: `off`
* `HTTP_AUTHORIZATION`
* when calling the `proxy` endpoint, the value of `HTTP_AUTHORIZATION` will be used to set the HTTP Authorization header
* Default value: `null`
* when calling the `proxy` endpoint, the value of `HTTP_AUTHORIZATION` will be used to set the HTTP Authorization header
* Default value: `null`
* `ALLOW_PLANTUML_INCLUDE`
* Enables `!include` processing which can read files from the server into diagrams. Files are read relative to the current working directory.
* Default value: `false`
* Enables `!include` processing which can read files from the server into diagrams. Files are read relative to the current working directory.
* Default value: `false`


## Alternate: How to build your docker image
Expand All @@ -112,7 +118,7 @@ So, you can use following command to create a self-contained docker image that w
docker image build -t plantuml-server:local .
docker run -d -p 8080:8080 plantuml-server:local
```
The server is now listening to [http://localhost:8080/plantuml](http://localhost:8080/plantuml).
The server is now listening to [http://localhost:8080](http://localhost:8080).

You may specify the port in `-p` Docker command line argument.

Expand Down
Loading

0 comments on commit deda3c2

Please sign in to comment.