Skip to content

Commit

Permalink
Archive all taps after parallel run
Browse files Browse the repository at this point in the history
Access archived tap file from jobs archive directory

Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo committed May 29, 2024
1 parent c999e31 commit 2820c9e
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -996,15 +996,19 @@ class Builder implements Serializable {
}
}
context.parallel jobs
context.node('worker') {
// Archive tap files as a single tar file
context.sh "find . -type f -name '*.tap' -exec tar -czf AQAvitTapFiles.tar.gz {} + "
try {
context.timeout(time: pipelineTimeouts.ARCHIVE_ARTIFACTS_TIMEOUT, unit: 'HOURS') {
context.archiveArtifacts artifacts: "AQAvitTapFiles.tar.gz"
if (enableTests) {
def archiveDir = "${env.JENKINS_HOME}/jobs/${env.JOB_NAME}/builds/${env.BUILD_NUMBER}/archive"
def tarTap = "AQAvitTapFiles.tar.gz"
context.node('worker') {
// Archive tap files as a single tar file
context.sh "find ${archiveDir} -type f -name '*.tap' -exec tar -czf ${tarTap} {} + "
try {
context.timeout(time: pipelineTimeouts.ARCHIVE_ARTIFACTS_TIMEOUT, unit: 'HOURS') {
context.archiveArtifacts artifacts: "${tarTap}"
}
} catch (FlowInterruptedException e) {
throw new Exception("[ERROR] Archive AQAvitTapFiles.tar.gz timeout Exiting...")
}
} catch (FlowInterruptedException e) {
throw new Exception("[ERROR] Archive AQAvitTapFiles.tar.gz timeout Exiting...")
}
}
// publish to github if needed
Expand Down

0 comments on commit 2820c9e

Please sign in to comment.