Dedicated Maven Docker images which provides additional file resources needed.
A specialization of maven:3.9-eclipse-temurin-25(-alpine) providing also
-
openshift cli (oc)
-
yq (lightweight yaml processor)
-
ssh
-
ssh agent
-
some extra scripts.
Since version 34 also an 'alpine' version is build, which is smaller.
Also since 34, the java version is 25 because that is LTS now.
Image specifically created to perform a maven release. For this you need the ability to check out a branch (not detached head) and preform release commit using a private ssh key.
When running it expects an GITLAB_RUNNER_PRIVATE_KEY argument containing the private key to use for git checkout and pushing of commits:
docker run -it \
--env "GITLAB_RUNNER_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" \
ghcr.io/vpro/maven:latest \
/bin/bash -c "git clone [email protected]/npo-identity/poms/poms-maven.git && cd maven-release && mvn release:prepare release:perform"For github actions we don’t use this maven image.
The 'after maven' script is usefull though, and this was wrapped in https://github.com/marketplace/actions/after-maven