X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=0428fa1e6a9355f9e38be975e97b7e22c9bd97f8;hb=fc82cca2839aa68966cf3a14d25f91cad391c88b;hp=671482cba152c65b90afe296ef4ffd6305fcdac8;hpb=f4fae40a27390b16c88ca991358c62278f1c4d47;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 671482cb..0428fa1e 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -102,8 +102,9 @@ 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 -iy docker service logs y --timestamps &> containers_logs.txt" - archiveArtifacts artifacts: 'containers_logs.txt' + sh "docker service ls |grep \"${stackName}\"| awk '{print \$2}' | xargs -iy docker ps -af name=y --format \"{{.ID}} {{.Names}}\" --no-trunc | awk '{ print \"sudo cp /var/lib/docker/containers/\"\$1\"/\"\$1\"-json.log \"\$2\".log\"}' | xargs -iy bash -c y" + sh "sudo chown jenkins: osm*.log" + archiveArtifacts artifacts: '*.log' } node("${params.NODE}") {