From: garciadeblas Date: Sat, 30 Nov 2024 09:39:38 +0000 (+0100) Subject: Fix stage3 to capture exceptions in shell scripts that prevented robot results public... X-Git-Tag: v17.0.0~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F14782%2F1;p=osm%2Fdevops.git Fix stage3 to capture exceptions in shell scripts that prevented robot results publication Change-Id: Ib80e059cf900e6c467144a85a5482a129ae358ba Signed-off-by: garciadeblas --- diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 9023d9ce..dbdcf9a4 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -113,11 +113,17 @@ void run_robot_systest(String tagName, -c -t ${testName}""") } } finally { - sh("cp ${tempdir}/*.xml .") - sh("cp ${tempdir}/*.html .") - outputDirectory = sh(returnStdout: true, script: 'pwd').trim() - println("Present Directory is : ${outputDirectory}") - sh("tree ${outputDirectory}") + try { + sh("cp ${tempdir}/*.xml .") + sh("cp ${tempdir}/*.html .") + outputDirectory = sh(returnStdout: true, script: 'pwd').trim() + println("Present Directory is : ${outputDirectory}") + sh("tree ${outputDirectory}") + } catch (Exception e) { + println("Something happened during the execution of shell script: ${e.message}") + } + + println("Continue with the publication of Robot results...") println("passThreshold: ${passThreshold}") println("unstableThreshold: ${unstableThreshold}") step([