Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Emmanuel Cazenave | 79b74f6379 |
|
@ -9,17 +9,19 @@ def mail_notify(currentBuild, env, email) {
|
|||
// Hack to have the 'jenkins build back to normal' mail sent
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
if (env.GIT_BRANCH == 'origin/master') {
|
||||
step([
|
||||
$class: 'Mailer', notifyEveryUnstableBuild: true,
|
||||
recipients: email, sendToIndividuals: true
|
||||
])
|
||||
} else {
|
||||
author = sh(returnStdout: true, script: "/usr/bin/git show -s --format='%ae' HEAD").trim()
|
||||
step([
|
||||
$class: 'Mailer', notifyEveryUnstableBuild: true,
|
||||
recipients: author, sendToIndividuals: true
|
||||
])
|
||||
if (currentBuild.result != 'ABORTED') {
|
||||
if (env.GIT_BRANCH == 'origin/master') {
|
||||
step([
|
||||
$class: 'Mailer', notifyEveryUnstableBuild: true,
|
||||
recipients: email, sendToIndividuals: true
|
||||
])
|
||||
} else {
|
||||
author = sh(returnStdout: true, script: "/usr/bin/git show -s --format='%ae' HEAD").trim()
|
||||
step([
|
||||
$class: 'Mailer', notifyEveryUnstableBuild: true,
|
||||
recipients: author, sendToIndividuals: true
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue