summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eo/Utils.groovy24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/eo/Utils.groovy b/src/eo/Utils.groovy
index e647b51..4cb2ba8 100644
--- a/src/eo/Utils.groovy
+++ b/src/eo/Utils.groovy
@@ -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
+ ])
+ }
}
}