Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Use pre-installed Temurin JDKs in I-/Y-build tests on Linux #2690

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion JenkinsJobs/AutomatedTests/I_unit_linux.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def STREAMS = config.Streams
def JAVA_VERSIONS = ['21', '23']

def BUILD_CONFIGURATIONS = [
[javaVersion: 21, javaHome: "tool(type:'jdk', name:'openjdk-jdk21-latest')" ],
[javaVersion: 21, javaHome: "tool(type:'jdk', name:'temurin-jdk21-latest')" ],
[javaVersion: 23, javaHome: "installJDK('23', 'linux', 'x86_64', 'ea')" ]
]

Expand Down
14 changes: 9 additions & 5 deletions JenkinsJobs/YBuilds/Y_unit_linux.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('Jenk
def STREAMS = config.Streams

def BUILD_CONFIGURATIONS = [
[javaVersion: 17, javaHome: '''installJDK('https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz')''' ],
[javaVersion: 21, javaHome: '''installJDK('https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz')''' ],
[javaVersion: 24, javaHome: '''installJDK('https://download.java.net/java/early_access/jdk24/18/GPL/openjdk-24-ea+18_linux-x64_bin.tar.gz')''' ]
[javaVersion: 17, javaHome: "tool(type:'jdk', name:'temurin-jdk17-latest')" ],
[javaVersion: 21, javaHome: "tool(type:'jdk', name:'temurin-jdk21-latest')" ],
[javaVersion: 24, javaHome: "installTemurinJDK('24', 'linux', 'x86_64', 'ea')" ]
]

for (STREAM in STREAMS){
Expand Down Expand Up @@ -92,9 +92,13 @@ pipeline {
}
}

def installJDK(String downloadURL) {
def installTemurinJDK(String version, String os, String arch, String releaseType='ga') {
// Translate os/arch names that are different in the Adoptium API
if (arch == 'x86_64') {
arch == 'x64'
}
dir ("${WORKSPACE}/java") {
sh "curl -L ${downloadURL} | tar -xzf -"
sh "curl -L https://api.adoptium.net/v3/binary/latest/${version}/${releaseType}/${os}/${arch}/jdk/hotspot/normal/eclipse | tar -xzf -"
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).strip()
}
}
Expand Down
Loading