Skip to content

Support overriding java version using asdf

Adam Cohen requested to merge support-specifying-java-version into master

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:

  1. Use asdf-sbt instead of manually downloading the dpkg, and update from 1.3.4 to 1.3.8

  2. Use asdf-maven instead of using maven:3.6.3-jdk-11 Docker base image, but stick with same version of maven, v3.6.3

  3. Use asdf-java instead of using Java 11 from maven:3.6.3-jdk-11 Docker base image.

    Install the following 4 versions of Java

    1. adopt-openjdk-11.0.7+10
    2. adopt-openjdk-8u252-b09
    3. adopt-openjdk-13+33
    4. adopt-openjdk-14+36
  4. Set default Java version to adopt-openjdk-11.0.7+10 if the DS_JAVA_VERSION env var is not provided. Previous default version of Java was v11 as specified in the maven:3.6.3-jdk-11 Docker base image

What are the relevant issue numbers?

gitlab-org/gitlab#216082 (closed)

Testing

  1. Java 8
  2. Java 11
  3. Java 13
  4. Java 14

Test projects

  1. Java 13 test project
  2. Java 14 test project

Does this MR meet the acceptance criteria?

Edited by 🤖 GitLab Bot 🤖

Merge request reports