Skip to content

Commit

Permalink
Add pipeline publish link warning if job fails
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Nov 22, 2024
1 parent 8e527e7 commit 353efec
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1021,21 +1021,19 @@ class Builder implements Serializable {
optional: true
)
// Archive tap files as a single tar file if we have any
context.sh """
cd ${tarDir}/
if [[ `ls -l *.tap` ]]; then
tar -czf ${tarTap} *.tap
fi
"""
try {
def tarTapExists = context.sh(script: "ls -l ${tarDir}/${tarTap}", returnStatus:true)
if (tarTapExists == 0) {
def tapExists = context.sh(script: "ls -l ${tarDir}/*.tap", returnStatus:true)
if (tapExists == 0) {
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...")
}
}
}
Expand Down

0 comments on commit 353efec

Please sign in to comment.