From 237a5d1be3830a4f60afbc5811b2db91834b6844 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 31 Jul 2024 14:42:26 +0100 Subject: [PATCH 1/2] Re-order build pipeline build stages prio to AQA-tests Signed-off-by: Andrew Leonard --- .../common/openjdk_build_pipeline.groovy | 67 ++++++++++--------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index 197001975..86a780b33 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -2170,8 +2170,43 @@ class Build { } } + //buildInstaller if needed + if (enableInstallers) { + try { + // Installer job timeout managed by Jenkins job config + buildInstaller(versionInfo) + 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...") + } + } + if (!env.JOB_NAME.contains('pr-tester') && context.JENKINS_URL.contains('adopt')) { + try { + gpgSign() + } catch (Exception e) { + context.println(e.message) + currentBuild.result = 'FAILURE' + } + } + + if (!env.JOB_NAME.contains('pr-tester')) { // pr-tester does not sign the binaries + // Verify Windows and Mac Signing for Temurin + if (buildConfig.VARIANT == 'temurin') { + try { + verifySigning() + } catch (Exception e) { + context.println(e.message) + currentBuild.result = 'FAILURE' + } + } + } + // Run Smoke Tests and AQA Tests if (enableTests) { + if (currentBuild.result != "SUCCESS") { + context.println("[ERROR] Build stages were not successful, not running AQA tests") + } else { try { //Only smoke tests succeed TCK and AQA tests will be triggerred. if (runSmokeTests() == 'SUCCESS') { @@ -2203,37 +2238,7 @@ class Build { context.println(e.message) currentBuild.result = 'FAILURE' } - } - - //buildInstaller if needed - if (enableInstallers) { - try { - // Installer job timeout managed by Jenkins job config - buildInstaller(versionInfo) - signInstaller(versionInfo) - } catch (FlowInterruptedException e) { - throw new Exception("[ERROR] Installer job timeout (${buildTimeouts.INSTALLER_JOBS_TIMEOUT} HOURS) has been reached OR the downstream installer job failed. Exiting...") - } - } - if (!env.JOB_NAME.contains('pr-tester') && context.JENKINS_URL.contains('adopt')) { - try { - gpgSign() - } catch (Exception e) { - context.println(e.message) - currentBuild.result = 'FAILURE' - } - } - - if (!env.JOB_NAME.contains('pr-tester')) { // pr-tester does not sign the binaries - // Verify Windows and Mac Signing for Temurin - if (buildConfig.VARIANT == 'temurin') { - try { - verifySigning() - } catch (Exception e) { - context.println(e.message) - currentBuild.result = 'FAILURE' - } - } + } } // Compare reproducible build if needed From a1b198904058559a2618d4750c7556aa39fca3a0 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 31 Jul 2024 15:44:02 +0100 Subject: [PATCH 2/2] Re-order build pipeline build stages prio to AQA-tests Signed-off-by: Andrew Leonard --- pipelines/build/common/openjdk_build_pipeline.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index 86a780b33..cbcd63865 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -2204,7 +2204,7 @@ class Build { // Run Smoke Tests and AQA Tests if (enableTests) { - if (currentBuild.result != "SUCCESS") { + if (currentBuild.currentResult != "SUCCESS") { context.println("[ERROR] Build stages were not successful, not running AQA tests") } else { try {