Skip to content

Commit

Permalink
Archive all taps after parallel run (#1041)
Browse files Browse the repository at this point in the history
* Archive all taps after parallel run

Access archived tap file from jobs archive directory

Signed-off-by: Sophia Guo <[email protected]>

* Using CopyArtifact to grab all tap files

Signed-off-by: Sophia Guo <[email protected]>

---------

Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo authored Jun 3, 2024
1 parent 55ef5db commit 49d73e2
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,34 @@ class Builder implements Serializable {
}
}
context.parallel jobs
if (enableTests) {
def tarTap = 'AQAvitTapFiles.tar.gz'
def tarDir = 'AQAvitTaps'
context.node('worker') {
context.copyArtifacts(
projectName: env.JOB_NAME,
selector: context.specific("${env.BUILD_NUMBER}"),
filter: 'target/**/*.tap',
fingerprintArtifacts: true,
target: "${tarDir}/",
flatten: true,
optional: true
)
// Archive tap files as a single tar file
context.sh """
cd ${tarDir}/
tar -czf ${tarTap} *.tap
"""
try {
context.timeout(time: pipelineTimeouts.ARCHIVE_ARTIFACTS_TIMEOUT, unit: 'HOURS') {
context.archiveArtifacts artifacts: "${tarDir}/${tarTap}"
}
} catch (FlowInterruptedException e) {
throw new Exception("[ERROR] Archive AQAvitTapFiles.tar.gz timeout Exiting...")
}
}
}

// publish to github if needed
// Don't publish release automatically
if (publish || release) {
Expand Down

0 comments on commit 49d73e2

Please sign in to comment.