From 607e1490c8197062369d0682fa81ef0ab68050d3 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Mon, 9 Sep 2024 12:38:41 +0100 Subject: [PATCH] Don't invoke signing if enableSigning==false --- pipelines/build/common/openjdk_build_pipeline.groovy | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index 71d308aa9..508db9f1e 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -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 @@ -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" @@ -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...")