Skip to content

Commit 127509b

Browse files
committed
[I-Build-Tests] Use JDK23-EA for Linux-Java23 tests
Fixes eclipse-jdt/eclipse.jdt.ui#1664 See also https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/5179
1 parent 13f5159 commit 127509b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

JenkinsJobs/AutomatedTests/I_unit_linux.groovy

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,23 @@ pipeline {
2727
label 'centos-8'
2828
}
2929
30-
stages {
30+
stages {''' + (JAVA_VERSION != '23' ? '' : '''
31+
stage('Download latest JDK-23 EA') {
32+
steps {
33+
script{
34+
def path = "${WORKSPACE}/tools"
35+
dir(path) {
36+
sh 'curl -L https://staging-api.adoptium.net/v3/binary/latest/23/ea/linux/x64/jdk/hotspot/normal/eclipse?project=jdk | tar -xzf -'
37+
JAVA_23_HOME = path + '/' + sh(script: 'find -name "jdk-23+*"', returnStdout: true).substring(2).trim()
38+
}
39+
}
40+
}
41+
}
42+
''') + '''
3143
stage('Run tests'){
3244
environment {
3345
// Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of system commands like xvnc, pkill and sh
34-
JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk''' + JAVA_VERSION + '''-latest')
46+
JAVA_HOME = ''' + (JAVA_VERSION != '23' ? "tool(type:'jdk', name:'openjdk-jdk${JAVA_VERSION}-latest')" : '"${JAVA_23_HOME}"') + '''
3547
ANT_HOME = tool(type:'ant', name:'apache-ant-latest')
3648
PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}"
3749
ANT_OPTS = "-Djava.io.tmpdir=${WORKSPACE}/tmp -Djava.security.manager=allow"

0 commit comments

Comments
 (0)