Skip to content

Commit

Permalink
Do not archive before assembly phase when internal signing (Fixes cro…
Browse files Browse the repository at this point in the history
…ss-compile situation)

Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa committed Nov 12, 2024
1 parent b6ea304 commit 0231ce4
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1981,32 +1981,35 @@ def buildScriptsAssemble(
}

} finally {

// Always archive any artifacts including failed make logs..
try {
context.timeout(time: buildTimeouts.BUILD_ARCHIVE_TIMEOUT, unit: 'HOURS') {
// We have already archived cross compiled artifacts, so only archive the metadata files
if (buildConfig.BUILD_ARGS.contains('--cross-compile')) {
context.println '[INFO] Archiving JSON Files...'
context.archiveArtifacts artifacts: 'workspace/target/*.json'
} else {
context.archiveArtifacts artifacts: 'workspace/target/*'
}
}
} catch (FlowInterruptedException e) {
// Set Github Commit Status
if (env.JOB_NAME.contains('pr-tester')) {
updateGithubCommitStatus('FAILED', 'Build FAILED')
}
throw new Exception("[ERROR] Build archive timeout (${buildTimeouts.BUILD_ARCHIVE_TIMEOUT} HOURS) has been reached. Exiting...")
}
if ( !enableSigner ) { // Don't clean if we need the workspace for the later assemble phase
postBuildWSclean(cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter)
}
// Set Github Commit Status
if (env.JOB_NAME.contains('pr-tester')) {
updateGithubCommitStatus('SUCCESS', 'Build PASSED')
}
// Archive any artifacts including failed make logs, unless doing internal
// signing where we will perform this step after the assemble phase
if ( ! (enableSigner && (buildConfig.TARGET_OS == 'windows') || (buildConfig.TARGET_OS == 'mac') ) ) {
try {
context.timeout(time: buildTimeouts.BUILD_ARCHIVE_TIMEOUT, unit: 'HOURS') {
// We have already archived cross compiled artifacts, so only archive the metadata files
if (buildConfig.BUILD_ARGS.contains('--cross-compile')) {
context.println '[INFO] Archiving JSON Files...'
context.archiveArtifacts artifacts: 'workspace/target/*.json'
} else {
context.archiveArtifacts artifacts: 'workspace/target/*'
}
}
} catch (FlowInterruptedException e) {
// Set Github Commit Status
if (env.JOB_NAME.contains('pr-tester')) {
updateGithubCommitStatus('FAILED', 'Build FAILED')
}
throw new Exception("[ERROR] Build archive timeout (${buildTimeouts.BUILD_ARCHIVE_TIMEOUT} HOURS) has been reached. Exiting...")
}
// With the exclusion above this is no longer strictly requird
if ( !enableSigner ) { // Don't clean if we need the workspace for the later assemble phase
postBuildWSclean(cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter)
}
// Set Github Commit Status
if (env.JOB_NAME.contains('pr-tester')) {
updateGithubCommitStatus('SUCCESS', 'Build PASSED')
}
}
}
}
}
Expand Down

0 comments on commit 0231ce4

Please sign in to comment.