From f0ecb173acb9fc97436ff2a3d5fea9c3011fb36d Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Tue, 31 Aug 2021 17:03:36 +0200 Subject: [PATCH] Jenkinsfile: add mail pipeline --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 997ba54..a29dee3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,8 +9,8 @@ pipeline { } } post { - always { - emailext body: 'Please check why ${env.BUILD_TAG} failed! [${env.BUILD_URL}]', subject: 'Build FAILED! ${env.BUILD_TAG}', recipientProviders: [[$class: 'DevelopersRecipientProvider']] + failure { + emailext body: 'Please check #$BUILD_NUMBER $PROJECT_NAME - $BUILD_STATUS! See $BUILD_URL', subject: 'Build #$BUILD_NUMBER $PROJECT_NAME - $BUILD_STATUS!', recipientProviders: [developers(), requestor()] } } }