From 0b503a6739707cf030995399c11ba6fb2ca78ed9 Mon Sep 17 00:00:00 2001 From: Mike Marchetti Date: Fri, 21 Sep 2018 10:48:15 -0400 Subject: [PATCH] Fixup tempdir creation Change-Id: I6743c08d9423ab8cdbb88335bbf30811aa484168 Signed-off-by: Mike Marchetti --- jenkins/ci-pipelines/ci_stage_3.groovy | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 005232b3..aef40c1a 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -50,11 +50,9 @@ def uninstall_osm(stackName) { } def run_systest(stackName,tagName,testName) { - sh """ - tempdir=$(mktemp -d) - docker run -ti --network net${stackName} -v $tempdir:/usr/share/osm-devops/systest/reports osm/osmclient:${tagName} make -C /usr/share/osm-devops/systest ${testName} - cp $tempdir/*.xml . - """ + tempdir = sh(returnStdout: true, script: "mktemp -d").trim() + sh "docker run -ti --network net${stackName} -v ${tempdir}:/usr/share/osm-devops/systest/reports osm/osmclient:${tagName} make -C /usr/share/osm-devops/systest ${testName}" + cp "${tempdir}/*.xml ." junit '*.xml' } -- 2.25.1