Fixup tempdir creation 35/6535/1
authorMike Marchetti <mmarchetti@sandvine.com>
Fri, 21 Sep 2018 14:48:15 +0000 (10:48 -0400)
committerMike Marchetti <mmarchetti@sandvine.com>
Fri, 21 Sep 2018 14:48:28 +0000 (10:48 -0400)
Change-Id: I6743c08d9423ab8cdbb88335bbf30811aa484168
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
jenkins/ci-pipelines/ci_stage_3.groovy

index 005232b..aef40c1 100644 (file)
@@ -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'
 }