CSIT: Email publisher
[ci-management.git] / jjb / global-macros.yaml
index 03b99f5..0fee157 100644 (file)
           default: '{make-parallel-jobs}'
           description: "The number of cores to use for builds."
 
+- parameter:
+    name: make-test-os-parameter
+    parameters:
+      - string:
+          name: MAKE_TEST_OS
+          default: '{make-test-os}'
+          description: "The OS on which 'make test' is run."
+
 - parameter:
     name: csit-fail-on-crc-mismatch-parameter
     parameters:
           name: TOPO
           default: '{topo}'
           description: "Topology parameter"
-
-- parameter:
-    name: workspace-archive-artifacts-parameter
-    parameters:
-      - string:
-          name: WS_ARCHIVE_ARTIFACTS
-          default: '{artifacts}'
-          description: "Artifacts to archive in $WORKSPACE/archives."
 # [end] Keep 'parameter' entries ordered alphabetically, please.
 
 #### SCMS
           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:
             - recipients
 
 - publisher:
-    name: fdio-infra-publish
+    name: fdio-infra-publish-docs
     # macro to finish up a build.
     #
     # Handles the following:
-    #   - Shipping logs to Nexus or S3 logs repository
+    #   - Shipping docs S3 logs repository
     #   - Cleanup workspace
     publishers:
       - postbuildscript:
                 - SUCCESS
                 - UNSTABLE
               build-steps:
-                - shell: !include-raw: scripts/post_build_deploy_archives.sh
-                - shell: !include-raw: scripts/backup_upload_archives.sh
-                - fdio-infra-ship-logs
+                - fdio-infra-ship-docs
           mark-unstable-if-failed: true
       - workspace-cleanup:
           exclude:
           fail-build: false
 
 - publisher:
-    name: fdio-infra-shiplogs
-    # To archive things, the job will need to create an "archives" directory in
-    # the workspace and this macro will handle copying the contents of the
-    # archives directory.
-    #
-    # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files to
-    # archive. You can pass globstar patterns for example "**/*.xml **/*.log" as
-    # the archive pattern. This is a space separated list of files to archive.
+    name: fdio-infra-publish
+    # macro to finish up a build.
     #
-    # Also ensure that the workspace is cleaned up at the end of the build.
+    # Handles the following:
+    #   - Shipping logs to Nexus or S3 logs repository
+    #   - Cleanup workspace
     publishers:
       - postbuildscript:
           builders:
                 - SUCCESS
                 - UNSTABLE
               build-steps:
-                - shell: !include-raw: include-raw-deploy-archives.sh
-                - shell: !include-raw: scripts/backup_upload_archives.sh
-                - maven-target:
-                    maven-version: '{maven-version}'
-                    pom: '.archives/deploy-archives.xml'
-                    goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
-                    settings: 'jenkins-log-archives-settings'
-                    settings-type: cfp
-                    global-settings: 'global-settings'
-                    global-settings-type: cfp
-                - description-setter:
-                    regexp: '^Build logs: .*'
+                - shell: !include-raw: scripts/post_build_executor_info.sh
+                - shell: !include-raw: scripts/post_build_deploy_archives.sh
+                - fdio-infra-ship-backup-logs
+                - fdio-infra-ship-logs
           mark-unstable-if-failed: true
       - workspace-cleanup:
+          exclude:
+            # Do not clean up *.jenkins-trigger files for jobs that use a
+            # properties file as input for triggering another build.
+            - "**/*.jenkins-trigger"
           fail-build: false
 
 - publisher:
       - robot:
           output-path: '{output-path}'
           other-files: ''
+
 # [end] Keep 'publisher' entries ordered alphabetically, please.
 
 #### BUILDERS
           days-to-keep: '{build-days-to-keep}'
           num-to-keep: '{build-num-to-keep}'
 
+- builder:
+    name: fdio-infra-ship-docs
+    builders:
+      - config-file-provider:
+          files:
+            - file-id: "jenkins-log-archives-settings"
+              variable: "SETTINGS_FILE"
+      - config-file-provider:
+          files:
+            - file-id: "jenkins-s3-docs-ship"
+              target: $HOME/.aws/credentials
+      - shell: !include-raw:
+          - scripts/publish_library_py.sh
+      - shell: !include-raw:
+          - scripts/publish_docs.sh
+      - shell: !include-raw:
+          - ../global-jjb/shell/logs-clear-credentials.sh
+
+- builder:
+    name: fdio-infra-ship-backup-logs
+    builders:
+      - config-file-provider:
+          files:
+            - file-id: "jenkins-s3-log-ship"
+              variable: $HOME/.aws/credentials
+      - shell: !include-raw:
+          - scripts/publish_library_py.sh
+      - shell: !include-raw:
+          - scripts/publish_logs.sh
+      - shell: !include-raw:
+          - ../global-jjb/shell/logs-clear-credentials.sh
+
 - builder:
     name: fdio-infra-ship-logs
     builders:
       - shell: !include-raw:
           - ../global-jjb/shell/logs-clear-credentials.sh
       - description-setter:
-          regexp: "(^(Nexus|S3) build logs: .*)"
+          regexp: "(^Nexus build logs: .*)"
 
 - builder:
     name: packer-validate