Skip to content

Commit

Permalink
Using CopyArtifact to grab all tap files
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo committed May 31, 2024
1 parent 2820c9e commit d872d0d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,23 @@ class Builder implements Serializable {
}
context.parallel jobs
if (enableTests) {
def archiveDir = "${env.JENKINS_HOME}/jobs/${env.JOB_NAME}/builds/${env.BUILD_NUMBER}/archive"
def tarTap = "AQAvitTapFiles.tar.gz"
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 "find ${archiveDir} -type f -name '*.tap' -exec tar -czf ${tarTap} {} + "
context.sh """
cd ${tarDir}/
tar -czf ${tarTap} *.tap
"""
try {
context.timeout(time: pipelineTimeouts.ARCHIVE_ARTIFACTS_TIMEOUT, unit: 'HOURS') {
context.archiveArtifacts artifacts: "${tarTap}"
Expand Down

0 comments on commit d872d0d

Please sign in to comment.