self-ci/java
moparisthebest 9fa6cca726
Some checks reported errors
moparisthebest/self-ci/pipeline/head Something is wrong with the build of this commit
Add self-ci-rust
2020-11-22 01:23:32 -05:00
..
build.sh Add run-java script 2020-11-20 00:09:23 -05:00
Dockerfile Add run-java script 2020-11-20 00:09:23 -05:00
readme.md Add self-ci-rust 2020-11-22 01:23:32 -05:00
run-java Add run-java script 2020-11-20 00:09:23 -05:00

self-ci-java

A docker container with every version of the Java JDK 6 to 16 installed in it, and maven to work with them all, for building and testing java applications across all versions.

Meant to be ran in CI something like this:

docker run --rm -v "$HOME/.m2:/m2" -v "$PWD:/build" -e BRANCH_NAME -e BUILD_UID=$UID -e BUILD_GID=$(id -g) moparisthebest/self-ci-java:latest

Without arguments it will execute .jenkins/build.sh once for each version of Java installed, setting the env variables JAVA_VERSION (a number), JAVA_HOME, M2_HOME, and PATH appropriately so invocations of mvn and java just work. If you want to call another script each time:

docker run --rm -v "$HOME/.m2:/m2" -v "$PWD:/build" -e BRANCH_NAME -e BUILD_UID=$UID -e BUILD_GID=$(id -g) moparisthebest/self-ci-java:latest build.sh ./path/to/your/script.sh