Skip to content

Commit

Permalink
Don't invoke signing if enableSigning==false
Browse files Browse the repository at this point in the history
  • Loading branch information
sxa committed Sep 9, 2024
1 parent ae1d00c commit 607e149
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ class Build {
repoHandler.checkoutAdoptBuild(context)
printGitRepoInfo()
if ((buildConfig.TARGET_OS == 'mac' || buildConfig.TARGET_OS == 'windows') && buildConfig.JAVA_TO_BUILD != 'jdk8u' && enableSigner) {
context.println "Processing exploded build, sign JMODS, and assemble build, for platform ${buildConfig.TARGET_OS} version ${buildConfig.JAVA_TO_BUILD}"
context.println "Generating exploded build, sign JMODS, and assemble build, for platform ${buildConfig.TARGET_OS} version ${buildConfig.JAVA_TO_BUILD}"
def signBuildArgs
if (env.BUILD_ARGS != null && !env.BUILD_ARGS.isEmpty()) {
signBuildArgs = env.BUILD_ARGS + ' --make-exploded-image' + openjdk_build_dir_arg
Expand Down Expand Up @@ -1689,7 +1689,7 @@ class Build {
"${base_path}/jdk/modules/jdk.jpackage/jdk/jpackage/internal/resources/*"

// Should this part be under "if (enableSigner)" instead
// of it being on the earlier "if" section?
// of it being on the earlier "if" section?
context.node('eclipse-codesign') {
context.println 'SXA: batable-ish 1660'
context.sh "rm -rf ${base_path}/* || true"
Expand Down Expand Up @@ -2255,7 +2255,9 @@ class Build {
try {
// Installer job timeout managed by Jenkins job config
buildInstaller(versionInfo)
signInstaller(versionInfo)
if ( enableSigning) {
signInstaller(versionInfo)
}
} catch (FlowInterruptedException e) {
currentBuild.result = 'FAILURE'
throw new Exception("[ERROR] Installer job timeout (${buildTimeouts.INSTALLER_JOBS_TIMEOUT} HOURS) has been reached OR the downstream installer job failed. Exiting...")
Expand Down

0 comments on commit 607e149

Please sign in to comment.