Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive all taps after parallel run #1041

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 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,31 @@ 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 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...")
}
} catch (FlowInterruptedException e) {
throw new Exception("[ERROR] Archive AQAvitTapFiles.tar.gz timeout Exiting...")
}
}
// publish to github if needed
Expand Down