summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2017-06-01 00:44:20 -0700
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-06-23 15:08:13 -0700
commitb25f9cacddd875162f25e63e12549410c17cdeb1 (patch)
tree1e31777a12133d5e2553be7327b4de4aff4f2567 /jjb
parenta3bc239313e67cab44d8bc64c32534ac9c1a0886 (diff)
Send Build Notifications to Jenkins Admins
Given the number of jobs in OPNFV there isn't an easy way to discover when there is an issue affecting a large number of jobs without looking into individual job logs. By sending out email notifications on failed builds (using the email-ext plugin), we will have insight into causes for large sets of job failures, and also be able to identify non-job specific issues. This macro still needs to be added to jobs that already have publishers set, but by just adding it to defaults it should cover about half of all current jobs. JIRA: RELENG-257 Change-Id: I9d55bdd929a60004a16fa3c21bf1f7069f8786db Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/releng-defaults.yml7
-rw-r--r--jjb/global/releng-macros.yml14
2 files changed, 21 insertions, 0 deletions
diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml
index 283888603..75e00f983 100644
--- a/jjb/global/releng-defaults.yml
+++ b/jjb/global/releng-defaults.yml
@@ -12,3 +12,10 @@
properties:
- logrotate-default
+
+ publishers:
+ # Any project that has a publisher will not have this macro
+ # included due to the nature of JJB defaults. Projects will have
+ # to explicitly add this macro to their list of publishers in
+ # order for emails to be sent.
+ - email-jenkins-admins-on-failure
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index ced335cb9..ce8990564 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -489,3 +489,17 @@
unhealthy: 40
failing: 30
+# The majority of the email-ext plugin options are set to the default
+# for this macro so they can be managed through Jenkins' global
+# settings.
+- publisher:
+ name: email-jenkins-admins-on-failure
+ publishers:
+ - email-ext:
+ content-type: text
+ attach-build-log: true
+ compress-log: true
+ always: false
+ failure: true
+ send-to:
+ - recipients