Update postbuildscript syntax for JJB 2.0.3 35/56935/4
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 1 May 2018 19:48:52 +0000 (15:48 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Thu, 17 May 2018 14:54:02 +0000 (14:54 +0000)
JJB 2.0.3 changed the postbuildscript syntax a bit and requires
changes so that they work properly with version 2.x of PostBuildScript
plugin.

This patch requires that Jenkins also be updated to install the 2.x
release of PostBuildScript.

Change-Id: I65e52c8d9b2efa38a3d16193c176c65e87e704c1
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/global/releng-macros.yaml
jjb/xci/bifrost-verify-jobs.yaml
jjb/xci/xci-daily-jobs.yaml
jjb/xci/xci-merge-jobs.yaml
jjb/xci/xci-verify-jobs.yaml

index 1ff4799..b282cff 100644 (file)
     name: 'report-provision-result'
     publishers:
       - postbuildscript:
-          script-only-if-succeeded: true
           builders:
-            - shell: |
-                echo "export PROVISION_RESULT=PASS" >> $WORKSPACE/installer_track.sh
-                echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
-                echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
-            - shell:
-                !include-raw: installer-report.sh
+            - role: BOTH
+              build-on:
+                - SUCCESS
+              build-steps:
+                - shell: |
+                    echo "export PROVISION_RESULT=PASS" >> $WORKSPACE/installer_track.sh
+                    echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+                    echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
+                - shell:
+                    !include-raw: installer-report.sh
+          mark-unstable-if-failed: true
       - postbuildscript:
-          script-only-if-succeeded: false
-          script-only-if-failed: true
           builders:
-            - shell: |
-                echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
-                echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
-                echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
-            - shell:
-                !include-raw: installer-report.sh
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - UNSTABLE
+              build-steps:
+                - shell: |
+                    echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
+                    echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+                    echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
+                - shell:
+                    !include-raw: installer-report.sh
+          mark-unstable-if-failed: true
index 920ecdc..4ca7835 100644 (file)
       # yamllint enable rule:line-length
       - email-jenkins-admins-on-failure
       - postbuildscript:
-          script-only-if-succeeded: false
-          script-only-if-failed: false
           builders:
-            - shell:
-                !include-raw: ./xci-cleanup.sh
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - SUCCESS
+                - UNSTABLE
+              build-steps:
+                - shell: !include-raw: ./xci-cleanup.sh
+          mark-unstable-if-failed: true
 
 # -------------------------------
 # trigger macros
index 11db4e1..c1132ab 100644 (file)
       # yamllint enable rule:line-length
       - email-jenkins-admins-on-failure
       - postbuildscript:
-          script-only-if-succeeded: false
-          script-only-if-failed: false
           builders:
-            - shell:
-                !include-raw: ./xci-cleanup.sh
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - SUCCESS
+                - UNSTABLE
+              build-steps:
+                - shell: !include-raw: ./xci-cleanup.sh
+          mark-unstable-if-failed: true
 
 - job-template:
     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
index 2d112c7..cb438ad 100644 (file)
 
     publishers:
       - postbuildscript:
-          script-only-if-succeeded: false
-          script-only-if-failed: false
           builders:
-            - shell:
-                !include-raw: ./xci-cleanup.sh
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - SUCCESS
+                - UNSTABLE
+              build-steps:
+                - shell: !include-raw: ./xci-cleanup.sh
+          mark-unstable-if-failed: true
 
 - job-template:
     name: 'xci-merge-{distro}-{phase}-virtual-{stream}'
index 3b7df62..7dea536 100644 (file)
 
     publishers:
       - postbuildscript:
-          script-only-if-succeeded: false
-          script-only-if-failed: false
           builders:
-            - shell:
-                !include-raw: ./xci-cleanup.sh
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - SUCCESS
+                - UNSTABLE
+              build-steps:
+                - shell: !include-raw: ./xci-cleanup.sh
+          mark-unstable-if-failed: true
 
 
 - job-template: