Add macro for reporting the provision result
[releng.git] / jjb / global / releng-macros.yml
index aeeb246..c2cff32 100644 (file)
       - shell: |
           find $WORKSPACE -type f -name '*.log' | xargs rm -f
 
+- builder:
+    name: track-begin-timestamp
+    builders:
+      - shell: |
+          echo "export TIMESTAMP_START="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh
+
 - publisher:
     name: archive-artifacts
     publishers:
           <<: *email_ptl_defaults
           recipients: >
             ross.b.brattain@intel.com
+
+- publisher:
+    name: 'report-provision-result'
+    publishers:
+      - postbuildscript:
+          script-only-if-succeeded: true
+          builders:
+            - shell: |
+                echo "export PROVISION_RESULT=SUCCEED" >> $WORKSPACE/installer_track.sh
+                echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+            - shell:
+                !include-raw-escape: installer-report.sh
+      - postbuildscript:
+          script-only-if-failed: true
+          builders:
+            - shell: |
+                echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
+                echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+            - shell:
+                !include-raw-escape: installer-report.sh