pipeline { agent any parameters{ buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' ) } stages { stage('Copy artifacts') { steps { copyArtifacts filter: 'X_test.csv,X_val.csv,X_train.csv,Y_test.csv,Y_val.csv,Y_train.csv', fingerprintArtifacts: true, projectName: 'z487183-create-dataset', selector: workspace() } } stage('Prepare stats') { steps { sh './prepare-stats.sh' archiveArtifacts 'stats.txt' } } } }