From baf3607d0d5435d98215f775617b973029ebfc62 Mon Sep 17 00:00:00 2001 From: s434766 Date: Mon, 10 May 2021 10:56:36 +0200 Subject: [PATCH] s8 --- pytorch-training-eval/Jenkinsfile-eval | 32 ++++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pytorch-training-eval/Jenkinsfile-eval b/pytorch-training-eval/Jenkinsfile-eval index 6bc9bec..4149aed 100644 --- a/pytorch-training-eval/Jenkinsfile-eval +++ b/pytorch-training-eval/Jenkinsfile-eval @@ -2,29 +2,41 @@ 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' + ) + } stages { stage('checkout') { steps { - copyArtifacts fingerprintArtifacts: true, projectName: 's434766-create-dataset' - copyArtifacts fingerprintArtifacts: true, projectName: 's434766-training' + copyArtifacts fingerprintArtifacts: true, projectName: 's434766-create-dataset', selector: buildParameter('WHICH_BUILD_DATA') + copyArtifacts fingerprintArtifacts: true, projectName: 's434766-training', selector: buildParameter('WHICH_BUILD_TRAIN') } } stage('Docker'){ steps{ - sh 'python3 "./../stroke-pytorch-eval.py" >> eval.txt' + sh 'python3 "./stroke-pytorch-eval.py" >> eval.txt' } } stage('archiveArtifacts') { steps { archiveArtifacts 'eval.txt' } - post { - success { - emailext body: 'Evaluation of stroke predictions is finished', - subject: 's434766 evaluation finished', - to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' - } - } } + stage('sendMail') { + steps{ + emailext body: currentBuild.result ?: 'SUCCESS', + subject: 's434766 training', + to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' + } + } } } \ No newline at end of file