From f5d0b3ef6663e944a319c6017e77f369cecd3c33 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Wed, 25 Apr 2018 10:24:11 +0200 Subject: [PATCH] use mail_notify --- Jenkinsfile | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f99323b..49dc1e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,20 +24,7 @@ pipeline { script { utils = new Utils() utils.publish_cobertura_report('**/coverage.xml') - - // Hack to have the 'jenkins build back to normal' mail sent - if (currentBuild.result == null) { - currentBuild.result = 'SUCCESS' - } - if (env.BRANCH_NAME == 'master') { - step([$class: 'Mailer', notifyEveryUnstableBuild: true, - recipients: "manukaz@gmail.com", sendToIndividuals: true]) - } else { - step([$class: 'Mailer', - notifyEveryUnstableBuild: true, - recipients: emailextrecipients([[$class: 'CulpritsRecipientProvider'], - [$class: 'RequesterRecipientProvider']])]) - } + utils.mail_notify(currentBuild, env, 'manukaz@gmail.com') } } }