diff --git a/Jenkinsfile-dataset-stats b/Jenkinsfile-dataset-stats index b55c1ae..a76b960 100644 --- a/Jenkinsfile-dataset-stats +++ b/Jenkinsfile-dataset-stats @@ -30,7 +30,8 @@ pipeline { } stage('Archive file') { steps { - sh "docker cp $$(docker ps -aq -f status=exited -f ancestor=nbrt10/ium:v1 | head -n 1):/app/output.txt ${env.WORKSPACE}" + def containerId = sh(script: "docker ps -aq -f status=exited -f ancestor=nbrt10/ium:v1 | head -n 1", returnStdout: true).trim() + sh "docker cp ${containerId}:/app/output.txt ${env.WORKSPACE}" archiveArtifacts artifacts: 'output.txt', fingerprint: true } }