Fix ci_stage_3 logs creation for robot tests 98/9198/1
authorFelipe Vicens <felipe.vicens@atos.net>
Fri, 26 Jun 2020 12:34:26 +0000 (14:34 +0200)
committerFelipe Vicens <felipe.vicens@atos.net>
Fri, 26 Jun 2020 12:34:26 +0000 (14:34 +0200)
Change-Id: Ic09adc5d5e71d250ea1bb84c84ae6ea0d35f0ed0
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
jenkins/ci-pipelines/ci_stage_3.groovy

index b35e027..6c034e2 100644 (file)
@@ -102,9 +102,7 @@ def run_robot_systest(stackName,tagName,testName,envfile=null,kubeconfig=null,cl
 }
 
 def archive_logs(stackName) {
-    sh """
-       docker service ls | grep ${stackname} | awk '{print $2}' | xargs -i% docker service logs "%" --timestamps > containers_logs.txt 2>&1
-       """
+    sh "docker service ls |grep \"${stackname}\"| awk '{print \$2}'| xargs -iy docker service logs y --timestamps > containers_logs.txt 2>&1"
     archiveArtifacts artifacts: 'containers_logs.txt'
 }