Support overriding java version using asdf
What does this MR do?
This MR adds support for switching the Java version using the asdf version manager tool. The desired Java version can be passed in the DS_JAVA_VERSION environment variable.
The following notable changes have been implemented:
-
Use asdf-sbt instead of manually downloading the dpkg, and update from
1.3.4to1.3.8 -
Use asdf-maven instead of using
maven:3.6.3-jdk-11Docker base image, but stick with same version of maven,v3.6.3 -
Use asdf-java instead of using
Java 11frommaven:3.6.3-jdk-11Docker base image.Install the following 4 versions of Java
- adopt-openjdk-11.0.7+10
- adopt-openjdk-8u252-b09
- adopt-openjdk-13+33
- adopt-openjdk-14+36
-
Set default Java version to
adopt-openjdk-11.0.7+10if theDS_JAVA_VERSIONenv var is not provided. Previous default version of Java wasv11as specified in themaven:3.6.3-jdk-11Docker base image
What are the relevant issue numbers?
gitlab-org/gitlab#216082 (closed)
Testing
- Java 8
- Java 11
- Java 13
- Java 14
Test projects
- Java 13 test project
- Java 14 test project
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer