Skip to content

Commit

Permalink
[I-Build-Tests] Use JDK23-EA for Linux-Java23 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Nov 6, 2024
1 parent 13f5159 commit 5425912
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions JenkinsJobs/AutomatedTests/I_unit_linux.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,23 @@ pipeline {
label 'centos-8'
}
stages {
stages {''' + (JAVA_VERSION != '23' ? '' : '''
stage('Download latest JDK-23 EA') {
steps {
script{
def path = "${WORKSPACE}/tools"
dir(path) {
sh 'curl -L https://staging-api.adoptium.net/v3/binary/latest/23/ea/linux/x64/jdk/hotspot/normal/eclipse?project=jdk | tar -xzf -'
JAVA_23_HOME = path + '/' + sh(script: 'find -name "jdk-23+*"', returnStdout: true).substring(2).trim()
}
}
}
}
''') + '''
stage('Run tests'){
environment {
// 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
JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk''' + JAVA_VERSION + '''-latest')
JAVA_HOME = ''' + (JAVA_VERSION != '23' ? "tool(type:'jdk', name:'openjdk-jdk${JAVA_VERSION}-latest')" : '"${JAVA_23_HOME}"') + '''
ANT_HOME = tool(type:'ant', name:'apache-ant-latest')
PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}"
ANT_OPTS = "-Djava.io.tmpdir=${WORKSPACE}/tmp -Djava.security.manager=allow"
Expand Down

0 comments on commit 5425912

Please sign in to comment.