jstastny-cz opened a new issue, #773:
URL: https://github.com/apache/incubator-kie-issues/issues/773
The kogito-ci-build container uses SDKMan to manage versions of JDK and
Maven.
It offers a unified way to install multiple versions and easily switch
between them.
For cases when a job needs different version of JDK, we should introduce a
way to switch between preinstalled versions.
The switching could be implemented using env variables passed to docker run
command, `docker run ... -e JDK_VERSION=8.0.392-tem` and that would require
adjusting entrypoint.sh script to consume this value and call respective SDKMAN
command.
Pipelines then could in their agent configuration define the requested JDK
or MVN version override.
```
pipeline {
agent {
docker {
image:
args: '<default> -e JDK_VERSION=8.0.392-tem'
```
This might still not be enough for all cases, especially when PR check jobs
would be pre-generated - then the versions used need to be tweaked dynamically.
This could be done by implementing a jenkins pipeline shared library methods to
switch JDK and MVN versions on the fly by directly invoking sdk binary from a
shell step.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]