From aec670c4017a547249161a8581433e5a55af9714 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Mon, 6 May 2024 23:51:25 -0400 Subject: [PATCH] Testing only Signed-off-by: Sophia Guo --- buildenv/jenkins/JenkinsfileBase | 33 ++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 8310a0c424..0a54ca9d7c 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -1288,7 +1288,7 @@ def generateJob (newJobs, childTest, testJobName) { if (env.GENERATE_JOBS) { newJobs[childTest] = { echo "GENERATE_JOBS is set to true, set test job ${testJobName} params for generating the job" - createJob(testJobName, PLATFORM) + //createJob(testJobName, PLATFORM) } } else { def jobIsRunnable = false @@ -1350,19 +1350,28 @@ def triggerRerunJob () { def rerunJob = build job: rerunJobName, parameters: childParams, propagate: false def jobResult = rerunJob.getResult() def buildId = rerunJob.getNumber() - try { - echo "${rerunJobName} #${buildId} completed with status ${jobResult}" + echo "${rerunJobName} #${buildId} completed with status ${jobResult}" + node (env.SETUP_LABEL) { timeout(time: 1, unit: 'HOURS') { - copyArtifacts (projectName: "${rerunJobName}", - selector: specific("${buildId}"), - filter: "**/*.tap", - target:"${rerunJobName}/${buildId}") + 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 buildid ${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 buildid ${buildId}. Exit ..." + } } - step([$class: "TapPublisher", testResults: "${name}/${buildId}/**/*.tap", outputTapToConsole: false, failIfNoResults: true]) - archiveFile("${name}/${buildId}/**/*.tap", true) - } catch (Exception e) { - echo 'Exception: ' + e.toString() - echo "Cannot copy *.tap from ${rerunJobName} with buildid ${buildId} . Skipping copyArtifacts..." + } } }