Skip to content

Commit

Permalink
Set JAVA_HOME to run Jenkins itself
Browse files Browse the repository at this point in the history
  • Loading branch information
welandaz committed Nov 14, 2024
1 parent b855a78 commit b1e5801
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion acceptance-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val ciJenkinsBuild: Boolean by (gradle as ExtensionAware).extra

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(11))
}
}

Expand Down Expand Up @@ -80,6 +80,10 @@ jenkinsVersions
!ciJenkinsBuild && !OperatingSystem.current().isWindows
}

environment("JAVA_HOME", javaToolchains.launcherFor {
languageVersion.set(jenkinsVersion.javaVersion)
}.get().executablePath.toString())

javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(jenkinsVersion.javaVersion)
})
Expand Down

0 comments on commit b1e5801

Please sign in to comment.