pipeline { agent { dockerfile true } parameters{ buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'WHICH_BUILD' ) } stages { stage('checkout') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('WHICH_BUILD') } } stage('Docker'){ steps{ sh 'python3 "./pytorch-example-evaluate.py" > eval-acc-result.txt' } } stage('archiveArtifacts') { steps{ archiveArtifacts 'eval-acc-result.txt' } } } post { success { mail body: 'SUCCESS TRAINING', subject: 's440058', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } failure { mail body: 'FAILURE TRAINING', subject: 's440058', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } } }