From: Anil Belur Date: Thu, 20 Jan 2022 06:45:06 +0000 (+1000) Subject: Feat: Add support for OpenJDK17 X-Git-Tag: v0.73.0^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=8cbf2bea2228326391595c4ebc20d4a9e1a0dd19;p=releng%2Fglobal-jjb.git Feat: Add support for OpenJDK17 Change-Id: Ic6369e120cc256d081ebdd66c5d0d154c86fc73b Issue-ID: RELENG-4097 Signed-off-by: Anil Belur --- diff --git a/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml b/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml new file mode 100644 index 00000000..ce001792 --- /dev/null +++ b/releasenotes/notes/add-openjdk17-855b3d1e0197b5d9.yaml @@ -0,0 +1,8 @@ +--- +prelude: > + Enable support for OpenJDK17. +features: + - | + Add support for the latest version of JDK17 to be used with + lf-update-java-alternatives. This allows job to switch between the + required version of JDK. diff --git a/shell/update-java-alternatives.sh b/shell/update-java-alternatives.sh index 536063b9..39f46991 100644 --- a/shell/update-java-alternatives.sh +++ b/shell/update-java-alternatives.sh @@ -19,6 +19,8 @@ update-java-redhat() { export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" elif [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "12" ]]; then export JAVA_HOME="/usr/lib/jvm/java-12-openjdk" + elif [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "17" ]]; then + export JAVA_HOME="/usr/lib/jvm/java-17-openjdk" else export JAVA_HOME="/usr/lib/jvm/java-1.${SET_JDK_VERSION//[a-zA-Z:-]/}.0-openjdk" fi