Compare commits
6 Commits
main
...
wip/mail-n
Author | SHA1 | Date |
---|---|---|
Emmanuel Cazenave | cf2bab0751 | |
Emmanuel Cazenave | e1e6a0a468 | |
Emmanuel Cazenave | 91b0e54437 | |
Emmanuel Cazenave | 2e3dfc2dd5 | |
Emmanuel Cazenave | 57a5ffde5d | |
Emmanuel Cazenave | d593503e0e |
|
@ -9,18 +9,16 @@ def mail_notify(currentBuild, env, email) {
|
|||
// Hack to have the 'jenkins build back to normal' mail sent
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
if (env.GIT_BRANCH == 'origin/master') {
|
||||
step([
|
||||
$class: 'Mailer', notifyEveryUnstableBuild: true,
|
||||
recipients: email, sendToIndividuals: true
|
||||
])
|
||||
} else {
|
||||
author = sh(returnStdout: true, script: "git show -s --format='%ae' HEAD").trim()
|
||||
step([
|
||||
$class: 'Mailer', notifyEveryUnstableBuild: true,
|
||||
recipients: emailextrecipients([
|
||||
[$class: 'CulpritsRecipientProvider'],
|
||||
[$class: 'RequesterRecipientProvider']
|
||||
])
|
||||
recipients: author, sendToIndividuals: true
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue