Change-Id: I27195bd6b38e8f660e26c6db795e74942a371013
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
}
def archive_logs(stackName) {
- 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 y "
+ 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'
}