From b16fce0bebc26ddb5ceac8d9ba182339060eda45 Mon Sep 17 00:00:00 2001 From: Maciej Czajka Date: Wed, 11 May 2022 20:31:48 +0200 Subject: [PATCH] update jenkinsfile_train-sacred, jenkinsfile_predict --- Jenkinsfile_predict | 6 +++++- Jenkinsfile_train-sacred | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) 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