pipeline { agent { docker {image 'zadanie'} } parameters { gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' ) } stages { stage('Copy artifacts') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR') copyArtifacts fingerprintArtifacts: true, projectName: 's444501-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR') copyArtifacts fingerprintArtifacts: true, projectName: 's444501-evaluation/master', selector: buildParameter('BUILD_SELECTOR'), optional: true } } stage('Evaluate model') { steps { withEnv([]) { sh 'python eval.py' } } } stage('Archive model') { steps { archiveArtifacts artifacts: 'eval_results.json, metrics.png' } } } post { always { emailext body: "${currentBuild.currentResult}", subject: 's444501-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } } }