CSIT: Email publisher 94/33594/5
authorpmikus <pmikus@cisco.com>
Wed, 25 Aug 2021 12:59:54 +0000 (12:59 +0000)
committerpmikus <pmikus@cisco.com>
Thu, 26 Aug 2021 13:47:57 +0000 (13:47 +0000)
+ Fix email send when job fails
+ Resuse publishers as macro

Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: Ic6c5a5f97ff38243d0dc5d6a4665d21009acb026

jjb/csit/csit.yaml
jjb/global-macros.yaml

index 69c90ca..77406ca 100644 (file)
           - ../scripts/csit/trending.sh
 
     publishers:
-      - email-ext:
-          # yamllint disable-line rule:line-length
-          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
-          reply-to: ''
-          content-type: 'text'
-          subject: 'Failed tests as of  $BUILD_TIMESTAMP'
-          # yamllint disable-line rule:line-length
-          body: |
-                Following tests failed in the last trending job runs, listed per testbed type.
-
-                ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-failed-tests.txt"}}
-
-          always: true
-          failure: false
-
-      - email-ext:
-          # yamllint disable-line rule:line-length
-          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
-          reply-to: ''
-          content-type: 'text'
-          subject: 'Regressions as of  $BUILD_TIMESTAMP'
-          # yamllint disable-line rule:line-length
-          body: |
-                Following regressions occured in the last trending job runs, listed per testbed type.
-
-                ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-regressions.txt"}}
-
-          always: true
-          failure: false
-
-      - email-ext:
-          # yamllint disable-line rule:line-length
-          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
-          reply-to: ''
-          content-type: 'text'
-          subject: 'Progressions as of  $BUILD_TIMESTAMP'
-          # yamllint disable-line rule:line-length
-          body: |
-                Following progressions occured in the last trending job runs, listed per testbed type.
-
-                ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-progressions.txt"}}
-
-          always: true
-          failure: false
-
+      - csit-trending-failed:
+          branch: 'master'
+      - csit-trending-failed-job:
+          branch: 'master'
+      - csit-trending-progressions:
+          branch: 'master'
+      - csit-trending-regressions:
+          branch: 'master'
       - fdio-infra-publish-docs
       - fdio-infra-publish
 
           - ../scripts/csit/trending.sh
 
     publishers:
-      - email-ext:
-          # yamllint disable-line rule:line-length
-          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
-          reply-to: ''
-          content-type: 'text'
-          subject: '2009 LTS: Failed tests as of  $BUILD_TIMESTAMP'
-          # yamllint disable-line rule:line-length
-          body: |
-                Following tests failed in the last trending job runs, listed per testbed type.
-
-                ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-failed-tests.txt"}}
-
-          always: true
-          failure: false
-
-      - email-ext:
-          # yamllint disable-line rule:line-length
-          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
-          reply-to: ''
-          content-type: 'text'
-          subject: '2009 LTS: Regressions as of  $BUILD_TIMESTAMP'
-          # yamllint disable-line rule:line-length
-          body: |
-                Following regressions occured in the last trending job runs, listed per testbed type.
-
-                ${{FILE,path="path="resources/tools/presentation/_build/_static/vpp/trending-regressions.txt"}}
-
-          always: true
-          failure: false
-
-      - email-ext:
-          # yamllint disable-line rule:line-length
-          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
-          reply-to: ''
-          content-type: 'text'
-          subject: '2009 LTS: Progressions as of  $BUILD_TIMESTAMP'
-          # yamllint disable-line rule:line-length
-          body: |
-                Following progressions occured in the last trending job runs, listed per testbed type.
-
-                ${{FILE,path="path="resources/tools/presentation/_build/_static/vpp/trending-progressions.txt"}}
-
-          always: true
-          failure: false
-
+      - csit-trending-failed:
+          branch: '2009 LTS'
+      - csit-trending-failed-job:
+          branch: '2009 LTS'
+      - csit-trending-progressions:
+          branch: '2009 LTS'
+      - csit-trending-regressions:
+          branch: '2009 LTS'
       - fdio-infra-publish-docs
       - fdio-infra-publish
 
index 8059ac5..0fee157 100644 (file)
           fingerprint: true
           latest-only: true
 
+- publisher:
+    name: csit-trending-failed
+    publishers:
+      - email-ext:
+          # yamllint disable-line rule:line-length
+          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
+          reply-to: ''
+          content-type: 'text'
+          subject: '{branch}: Failed tests as of $BUILD_TIMESTAMP'
+          # yamllint disable-line rule:line-length
+          body: |
+              Following tests failed in the last trending job runs, listed per testbed type.
+
+              ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-failed-tests.txt"}}
+          failure: false
+          success: true
+
+- publisher:
+    name: csit-trending-failed-job
+    publishers:
+      - email-ext:
+          # yamllint disable-line rule:line-length
+          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
+          reply-to: ''
+          content-type: 'text'
+          subject: '{branch}: The build number $BUILD_NUMBER of the job $JOB_NAME failed'
+          # yamllint disable-line rule:line-length
+          body: |
+              For more information see $BUILD_URL.
+          failure: true
+          success: false
+
+- publisher:
+    name: csit-trending-progressions
+    publishers:
+      - email-ext:
+          # yamllint disable-line rule:line-length
+          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
+          reply-to: ''
+          content-type: 'text'
+          subject: '{branch}: Progressions as of $BUILD_TIMESTAMP'
+          # yamllint disable-line rule:line-length
+          body: |
+              Following progressions occured in the last trending job runs, listed per testbed type.
+
+              ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-progressions.txt"}}
+          failure: true
+          success: false
+
+- publisher:
+    name: csit-trending-regressions
+    publishers:
+      - email-ext:
+          # yamllint disable-line rule:line-length
+          recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
+          reply-to: ''
+          content-type: 'text'
+          subject: '{branch}: Regressions as of $BUILD_TIMESTAMP'
+          # yamllint disable-line rule:line-length
+          body: |
+              Following regressions occured in the last trending job runs, listed per testbed type.
+
+              ${{FILE,path="resources/tools/presentation/_build/_static/vpp/trending-regressions.txt"}}
+          failure: true
+          success: false
+
 - publisher:
     name: email-notification
     publishers:
       - robot:
           output-path: '{output-path}'
           other-files: ''
+
 # [end] Keep 'publisher' entries ordered alphabetically, please.
 
 #### BUILDERS