From 070e10f2ce201755dc244f42aa5272d6f918b633 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 1 May 2018 15:48:52 -0400 Subject: Update postbuildscript syntax for JJB 2.0.3 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 --- jjb/global/releng-macros.yaml | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'jjb/global') diff --git a/jjb/global/releng-macros.yaml b/jjb/global/releng-macros.yaml index 1ff4799ab..b282cff4f 100644 --- a/jjb/global/releng-macros.yaml +++ b/jjb/global/releng-macros.yaml @@ -986,21 +986,31 @@ 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 -- cgit 1.2.3-korg