pipeline { agent { docker { image 's478841-image:latest' } } parameters { gitParameter branFilter: 'origin/(.*)', defaultValue: 'develop', name: 'BRANCH_NAME', type:'PT_BRANCH' buildSelector( defaultSelector: upstream(), description: 'Build used for artifacts copying', name:'BUILD_SELECTOR') } stages { stage('Copy artifacts') { steps { git branch: '${params.BRANCH}', url: 'https://git.wmi.amu.edu,pl/s478841/ium_478841/${BRANCH}/', selector: buildParameter('BUILD_SELECTOR') copyArtifacts filter: 'data/*test*', fingerprintArtifacts: true, projectName: 's478841-create-dataset', selector: buildParameter('BUILD_SELECTOR') copyArtifacts filter: 'evaluation_results.txt', projectName: 's478841-evaluation/develop/', optional: true } } stage('Evaluate model') { steps { sh 'chmod +x -R ${env.WORKSPACE}' sh 'python3 scripts/evaluate.py' } } stage('Archive artifacts') { steps { archiveArtifacts 'evaluation_results.txt', onlyIfSuccessful: true archiveArtifacts 'plots.png', onlyIfSuccessful: true } } } post { success { emailext body: 'SUCCESS', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } failure { emailext body: 'FAILURE', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } unstable { emailext body: 'UNSTABLE', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } changed { emailext body: 'CHANGED', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } } }