From 7abe9c8d0874d852fa3cf39771ffdee13b0537b4 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 5 May 2022 21:53:00 +0200 Subject: [PATCH] Send emails after training --- Jenkinsfile-train | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Jenkinsfile-train b/Jenkinsfile-train index 7b8aeed..4e67552 100644 --- a/Jenkinsfile-train +++ b/Jenkinsfile-train @@ -13,10 +13,30 @@ pipeline { } } + environment { + NOTIFICATION_ADDRESS = 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + post { always { archiveArtifacts artifacts: 'model_out', onlyIfSuccessful: true } + + success { + emailext body: 'SUCCESS', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}" + } + + failure { + emailext body: 'FAILURE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}" + } + + unstable { + emailext body: 'UNSTABLE', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}" + } + + changed { + emailext body: 'CHANGED', subject: "${env.JOB_NAME}", to: "${env.NOTIFICATION_ADDRESS}" + } } }