pipeline { agent { dockerfile true } parameters{ buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'WHICH_BUILD_DATA' ) buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'WHICH_BUILD_TRAIN' ) } stages { stage('checkout') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's434766-create-dataset', selector: buildParameter('WHICH_BUILD_DATA') copyArtifacts fingerprintArtifacts: true, projectName: 's434766-training', selector: buildParameter('WHICH_BUILD_TRAIN') } } stage('Docker'){ steps{ sh 'python3 "./stroke-pytorch-eval.py" >> eval.txt' } } stage('archiveArtifacts') { steps { archiveArtifacts 'eval.txt' } } stage('sendMail') { steps{ emailext body: currentBuild.result ?: 'SUCCESS', subject: 's434766 training', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } } } }