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' ) buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'WHICH_BUILD_EVAL' ) gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' } stages { stage('copyArtifacts') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's430705-create-dataset', selector: buildParameter('WHICH_BUILD_DATA') copyArtifacts fingerprintArtifacts: true, projectName: 's430705-training/master', selector: buildParameter('WHICH_BUILD_TRAIN') copyArtifacts optional: true, fingerprintArtifacts: true, projectName: 's430705-evaluation/master', selector: buildParameter('WHICH_BUILD_EVAL') } } stage('Evaluation') { steps{ sh 'python3 "./lab06-eval.py ${env.BUILD_ID}"' sh 'python3 "./lab06-plot.py"' sh 'python3 "./lab07_sacred01.py"' sh 'python3 "./lab07_sacred02.py"' } } stage('archiveArtifacts') { steps { archiveArtifacts 'eval.txt' archiveArtifacts 'lab07/**' archiveArtifacts 'evaluation_plot.png' } } } post { success { mail body: 'SUCCESS', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } unstable { mail body: 'UNSTABLE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } failure { mail body: 'FAILURE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } changed { mail body: 'CHANGED', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' } } }