diff --git a/Jenkinsfile_predict b/Jenkinsfile_predict index e9dec85..7574b8a 100644 --- a/Jenkinsfile_predict +++ b/Jenkinsfile_predict @@ -5,6 +5,10 @@ pipeline { } } parameters { +buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts for predict', + name: 'BUILD_SELECTOR') string( defaultValue: 'input_example.json', description: 'Input file name', @@ -16,7 +20,7 @@ pipeline { stages { stage('Script') { steps { - copyArtifacts projectName: 's444409-training/main', selector: lastSuccessful() + copyArtifacts projectName: 's444409-training/main', selector: buildParameter('BUILD_SELECTOR') sh 'python3 ./predict.py $INPUT' } } diff --git a/Jenkinsfile_train-sacred b/Jenkinsfile_train-sacred index 39735ff..4bed085 100644 --- a/Jenkinsfile_train-sacred +++ b/Jenkinsfile_train-sacred @@ -23,7 +23,22 @@ pipeline { archiveArtifacts artifacts: 'my_model/**' sh 'rm -r mlruns' sh 'rm -r my_model' + build job: 's444356-evaluation/master/' } } } + post { + success { + emailext body: 'SUCCESS', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + failure { + emailext body: 'FAILURE', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + unstable { + emailext body: 'UNSTABLE', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + changed { + emailext body: 'CHANGED', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + } } \ No newline at end of file