Skip to content

Commit

Permalink
Copy and archive rerun build tap files (#5287)
Browse files Browse the repository at this point in the history
* Archive rerun tap files

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

* Cleanup

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

* Update buildenv/jenkins/JenkinsfileBase

Co-authored-by: Martijn Verburg <[email protected]>

* Update buildenv/jenkins/JenkinsfileBase

Co-authored-by: Martijn Verburg <[email protected]>

---------

Signed-off-by: Sophia Guo <[email protected]>
Co-authored-by: Martijn Verburg <[email protected]>
  • Loading branch information
sophia-guo and karianna authored May 13, 2024
1 parent f76dfc8 commit 0c00999
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,32 @@ def triggerRerunJob () {
}

if (childParams) {
build job: rerunJobName, parameters: childParams, propagate: false
def rerunJob = build job: rerunJobName, parameters: childParams, propagate: false
def jobResult = rerunJob.getResult()
def buildId = rerunJob.getNumber()
echo "${rerunJobName} #${buildId} completed with status ${jobResult}"
node (env.SETUP_LABEL) {
timeout(time: 1, unit: 'HOURS') {
try {
copyArtifacts (projectName: "${rerunJobName}",
selector: specific("${buildId}"),
filter: "**/*.tap",
target:"${rerunJobName}/${buildId}")
} catch (Exception e) {
echo 'Exception: ' + e.toString()
echo "Cannot copy *.tap from ${rerunJobName} with build id ${buildId} . Skipping copyArtifacts..."
}

try {
step([$class: "TapPublisher", testResults: "${rerunJobName}/${buildId}/**/*.tap", outputTapToConsole: false, failIfNoResults: true])
archiveFile("${rerunJobName}/${buildId}/**/*.tap", true)
} catch (Exception e) {
echo 'Exception: ' + e.toString()
echo "Cannot archive tap files from ${rerunJobName} with build id ${buildId}. Exit ..."
}
}

}
}
}
}
Expand Down

0 comments on commit 0c00999

Please sign in to comment.