pipeline { agent { docker { image 'maciejczajka/ium:v4' } } parameters{ buildSelector( defaultSelector: lastSuccessful(), name: 'BUILD_SELECTOR', description: 'Which build to use for copying artifacts' ) } stages { stage("Script") { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's444356-create-dataset', selector: buildParameter('BUILD_SELECTOR') sh " ./stats.sh" archiveArtifacts 'lines.txt' } } } }