node { stage('Preparation') { properties([ parameters([ buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR') ]) ]) } stage('checkout: Check out from version control') { checkout scm } stage('Copy Artifacts') { copyArtifacts fingerprintArtifacts: true, projectName: 's487182-create-dataset', selector: buildParameter('BUILD_SELECTOR') archiveArtifacts artifacts: 'waterQuality.csv, output.txt' } stage('sh: Shell Script') { sh 'python3 dataset_stats.py > output.txt' archiveArtifacts artifacts: 'output.txt' } }