This commit is contained in:
Norbert Walkowiak 2023-04-18 08:52:50 +02:00
parent ccd282b741
commit e4e1ab3f24

View File

@ -30,8 +30,10 @@ pipeline {
}
stage('Archive file') {
steps {
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}"
script {
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
}
}