1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-10-30 23:57:50 +02:00

Fix mail notification

- send "build failed" mail only when an exception has been received.
 - provide a non empty mail message, since an empty mail body causes the build to fail.
This commit is contained in:
Marcus Holl
2017-11-15 12:06:38 +01:00
committed by kbarnold
parent a72cd278b4
commit e9a17aa41c

7
Jenkinsfile vendored
View File

@@ -13,8 +13,7 @@ node {
} catch (Throwable err) {
echo "Error occured: ${err}"
currentBuild.result = 'FAILURE'
mail subject: '[Build failed] SAP/jenkins-library', body: 'Fix the build.', to: 'k.arnold@sap.com,marcus.holl@sap.com,oliver.nocon@sap.com'
throw err
} finally {
mail subject: '[Build failed] SAP/jenkins-library', body: '', to: 'k.arnold@sap.com,marcus.holl@sap.com,oliver.nocon@sap.com'
}
}
}
}