plantuml / plantuml-server

PlantUML Online Server
https://plantuml.com/
GNU General Public License v3.0
1.6k stars 463 forks source link

chore: merge main actions back to single workflow #201

Closed stevehipwell closed 2 years ago

stevehipwell commented 2 years ago

I've merged the main workflows back into a single workflow but kept them in separate jobs as @HeinrichAD had them in https://github.com/plantuml/plantuml-server/pull/198. This should fix the failure to create tagged Docker images and make it easier to understand the release workflow.

@HeinrichAD I'd be interested as to why you swapped from Adopt to Zulu instead of Temurin?

stevehipwell commented 2 years ago

@arnaudroques are you able to manually create the missing Docker tags with docker tag?

arnaudroques commented 2 years ago

@stevehipwell I'm not sure how to do that. However, I'm going to release V1.2021.14 in the incoming days/hours (and that will trigger the workflow). It's probably not a big issue if V1.2021.13 will be missing on docker side.

arnaudroques commented 2 years ago

@stevehipwell It looks like docker is up to date now. Thanks again!

stevehipwell commented 2 years ago

Thanks @arnaudroques I can see them on Docker Hub.

HeinrichAD commented 2 years ago

@stevehipwell Thanks for fixing this issue. To answer your question, I switched from Adopt to Zulu since adopt has been discontinued. I searched for alternative and found temurin and zulu here.

I choose Zulu because I did not found any breaking difference and because @carldea suggested to use it for plantuml-server. Perhaps he can write more on the advantages of Zulu over Temurin and why he explicit suggested Zulu. In my humble opinion, it doesn't matter which OpenJDK is used for this project as long as it's sill maintained and continued. But maybe one of you two knows more. Possibly also interesting: PR #195

stevehipwell commented 2 years ago

@HeinrichAD when Adopt joined the Eclipse foundation they renamed the distro to Temurin. Previously Zulu was seen as an option when you needed Alpine support but as of v17 Temurin has this.

My personal suggestion would be to switch back to Temurin for consistency with the previous behaviour and because Adopt was, and I still think is, the baseline implementation. However on this you're 100% right that this probably doesn't matter.

carldea commented 2 years ago

@stevehipwell AdoptOpenJDK OpenJDK builds are not the same (binaries) as some folks would like you to believe. Aside from them being discontinued, they were never TCK (licensed) tested. If the team tried to swap it (w/ Temurin) under the covers that’s not exactly cool either.

Temurin builds are excellent builds however it doesn’t support archived fixed JDK versions prior to Sept 2021 or many non-LTS versions.

Zulu is actually more consistent in terms of supported JDK versions, OSes, & architectures.

The original setup-java@v1 was Zulu. When v2 came about it required the distribution: attribute where lot's of builds would break because many versions, OSes, or platforms weren’t supported due to Temurin being somewhat new.

Both are great choices & yes, at the end of the day (most cases) it doesn’t matter😁.

Here’s my write-up on the topic: https://foojay.io/today/github-actions-with-java-part-2/

stevehipwell commented 2 years ago

@carldea it's a common mistake people make about OpenJDK, especially the Docker images. What would your preferred base image be for the Docker builds?

carldea commented 2 years ago

@carldea it's a common mistake people make about OpenJDK, especially the Docker images. What would your preferred base image be for the Docker builds?

Good question!

I typically go docker hub here: azul/zulu-openjdk-alpine:16.0.2-jre

Dockerfile could look like the following:

FROM azul/zulu-openjdk-alpine:16.0.2-jre
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/zulu16-ca
ENV JAVA_OPTS="-Xmx2G"
stevehipwell commented 2 years ago

I guess we need to consider if PlantUML will work on Alpine? But the actual images being used are jetty:11.0.7-jre11-slim and tomcat:10-jdk11-openjdk-slim so we can't simply swap to Zulu.

HeinrichAD commented 2 years ago

I am pretty sure that PlantUML will work on Alpine without any problems.

Unfortunately, Jetty and Tomcat do not offer any Alpine images themselves. (At least none which are still maintained.) We would need to create and maintain them our-self. I do not know if we really want to do this.

stevehipwell commented 2 years ago

@HeinrichAD that was the point of my question to @carldea. I'd be much more comfortable if the Docker images used the release artefacts rather than re-creating them from scratch as part of a multi-stage Docker build.