Support PostBuildScript 2.x 87/9387/3
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 12 Mar 2018 01:48:09 +0000 (21:48 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 12 Mar 2018 15:22:38 +0000 (11:22 -0400)
This is a breaking change that requires consumers of global-jjb
to switch to JJB 2.0.3 and install PostBuildScript 2.x in Jenkins.

It updates lf-infra-publish macro to switch to the PostBuildScript 2.x
YAML definitions.

Issue: RELENG-832
Change-Id: I04020587acfb8b6550c0221ebfb97a501f46b15a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/lf-macros.yaml
tox.ini

index fb17992..133becd 100644 (file)
     publishers:
       - postbuildscript:
           builders:
-            - lf-infra-sysstat
-            - lf-infra-ship-logs
-          script-only-if-succeeded: false
-          script-only-if-failed: false
-          mark-unstable-if-failed: false
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - SUCCESS
+                - UNSTABLE
+              build-steps:
+                - lf-infra-sysstat
+                - lf-infra-ship-logs
+          mark-unstable-if-failed: true
       - workspace-cleanup:
           exclude:
             # Do not clean up *.jenkins-trigger files for jobs that use a
diff --git a/tox.ini b/tox.ini
index ede16ca..69381d0 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -29,7 +29,7 @@ commands =
 
 [testenv:jjb]
 deps =
-    jenkins-job-builder==2.0.2
+    jenkins-job-builder>=2.0.3
 commands =
     jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test