Send Build Notifications to Jenkins Admins 01/35801/4
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 1 Jun 2017 07:44:20 +0000 (00:44 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 23 Jun 2017 22:08:13 +0000 (15:08 -0700)
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>
jjb/global/releng-defaults.yml
jjb/global/releng-macros.yml

index 2838886..75e00f9 100644 (file)
 
     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
index ced335c..ce89905 100644 (file)
                 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