diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index 5322cf766..f495ac44f 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -301,7 +301,7 @@ class Build { // Use BUILD_REF override if specified vendorTestBranches = buildConfig.BUILD_REF ?: vendorTestBranches - + try { context.println 'Running smoke test' context.stage('smoke test') { @@ -332,10 +332,10 @@ class Build { context.string(name: 'VENDOR_TEST_REPOS', value: vendorTestRepos), context.string(name: 'VENDOR_TEST_BRANCHES', value: vendorTestBranches), context.string(name: 'TIME_LIMIT', value: '1') - ] + ] currentBuild.result = testJob.getResult() return testJob.getResult() - + } } catch (Exception e) { context.println "Failed to execute test: ${e.message}" @@ -351,7 +351,7 @@ class Build { def jdkBranch = getJDKBranch() def jdkRepo = getJDKRepo() def openj9Branch = (buildConfig.SCM_REF && buildConfig.VARIANT == 'openj9') ? buildConfig.SCM_REF : 'master' - + List testList = buildConfig.TEST_LIST List dynamicList = buildConfig.DYNAMIC_LIST List numMachines = buildConfig.NUM_MACHINES @@ -463,7 +463,7 @@ class Build { wait: true currentBuild.result = testJob.getResult() context.node('worker') { - //Copy Taps files from downstream test jobs if files available. + //Copy Taps files from downstream test jobs if files available. context.sh 'rm -f workspace/target/AQAvitTaps/*.tap' try { context.timeout(time: 2, unit: 'HOURS') { @@ -543,7 +543,7 @@ class Build { } } - targets.each { targetMode, targetTests -> + targets.each { targetMode, targetTests -> try { context.println "Remote trigger: ${targetTests}" remoteTargets["${targetTests}"] = { @@ -1478,13 +1478,11 @@ class Build { context.unstash 'jmods' context.withEnv(["macos_base_path=${macos_base_path}"]) { // groovylint-disable - try { - context.sh ''' + context.sh ''' #!/bin/bash set -eu echo "Signing JMOD files" TMP_DIR="${macos_base_path}/" - MACSIGNSTRING="Apple Certification Authority" ENTITLEMENTS="$WORKSPACE/entitlements.plist" FILES=$(find "${TMP_DIR}" -perm +111 -type f -o -name '*.dylib' -type f || find "${TMP_DIR}" -perm /111 -type f -o -name '*.dylib' -type f) for f in $FILES @@ -1493,46 +1491,11 @@ class Build { dir=$(dirname "$f") file=$(basename "$f") mv "$f" "${dir}/unsigned_${file}" - curl --fail -o "$f" -F file="@${dir}/unsigned_${file}" -F entitlements="@$ENTITLEMENTS" https://cbi.eclipse.org/macos/codesign/sign - TESTMACSIGN=`grep -i "$MACSIGNSTRING" "$f"|wc -l` - if [ $TESTMACSIGN -gt 0 ] - then - echo "Code Signed" - chmod --reference="${dir}/unsigned_${file}" "$f" - rm -rf "${dir}/unsigned_${file}" - else - max_iterations=20 - iteration=1 - while [ $iteration -le $max_iterations ] - do - echo "Code Not Signed - Have Another Try" - sleep 1 - curl --fail -o "$f" -F file="@${dir}/unsigned_${file}" -F entitlements="@$ENTITLEMENTS" https://cbi.eclipse.org/macos/codesign/sign - TESTMACSIGN2=`grep -i "$MACSIGNSTRING" "$f"|wc -l` - if [ $TESTMACSIGN2 -gt 0 ] - then - echo "$f Signed OK On Attempt $iteration" - chmod --reference="${dir}/unsigned_${file}" "$f" - rm -rf "${dir}/unsigned_${file}" - break - else - echo "$f Failed Signing On Attempt $iteration" - iteration=$((iteration+1)) - fi - if [ $iteration -eq $max_iterations ] - then - echo "Reached Max Attempts = $max_iterations" - exit 1 - fi - done - fi + curl -o "$f" -F file="@${dir}/unsigned_${file}" -F entitlements="@$ENTITLEMENTS" https://cbi.eclipse.org/macos/codesign/sign + chmod --reference="${dir}/unsigned_${file}" "$f" + rm -rf "${dir}/unsigned_${file}" done ''' - } catch (e) { - context.println("Failed to Perform Signing") - currentBuild.result = 'FAILURE' - } - // groovylint-enable } context.stash name: 'signed_jmods', includes: "${macos_base_path}/**/*" @@ -1707,7 +1670,7 @@ class Build { } } - /* + /* this function should only be used in pr-tester */ def updateGithubCommitStatus(STATE, MESSAGE) { @@ -1759,7 +1722,7 @@ class Build { context.println "Executing tests: ${buildConfig.TEST_LIST}" context.println "Build num: ${env.BUILD_NUMBER}" context.println "File name: ${filename}" - + def enableReproducibleCompare = Boolean.valueOf(buildConfig.ENABLE_REPRODUCIBLE_COMPARE) def enableTests = Boolean.valueOf(buildConfig.ENABLE_TESTS) def enableInstallers = Boolean.valueOf(buildConfig.ENABLE_INSTALLERS) @@ -1962,7 +1925,7 @@ class Build { platform = 'x86-64_' + buildConfig.TARGET_OS } else { platform = buildConfig.ARCHITECTURE + '_' + buildConfig.TARGET_OS - } + } if ( !(platform == 'riscv64_linux' || platform =='aarch64_windows') ) { if ( !(buildConfig.JAVA_TO_BUILD == 'jdk8u' && platform == 's390x_linux') ) { context.echo "Remote trigger Eclipse Temurin AQA_Test_Pipeline job with ${platform} ${buildConfig.JAVA_TO_BUILD}"