Merge "Apex: changes build result using groovy-postbuild"
authorAric Gardner <agardner@linuxfoundation.org>
Mon, 31 Jul 2017 14:58:15 +0000 (14:58 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 31 Jul 2017 14:58:15 +0000 (14:58 +0000)
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/apex/update-build-result.groovy [new file with mode: 0644]

index f18fe40..f47775f 100644 (file)
             on-evaluation-failure: mark-unstable
             steps:
                 - shell: 'echo "Tests Passed"'
+# Build status is always success due conditional plugin prefetching
+# build status before multijob phases execute
+#        - conditional-step:
+#            condition-kind: current-status
+#            condition-worst: SUCCESS
+#            condtion-best: SUCCESS
+#            on-evaluation-failure: mark-unstable
+#            steps:
+#                - shell: 'echo "Tests Passed"'
+
+    publishers:
+        - groovy-postbuild:
+            script:
+                !include-raw-escape: ./update-build-result.groovy
 
 
 # danube Daily
index d7b67c3..a3cc9c6 100644 (file)
             on-evaluation-failure: mark-unstable
             steps:
                 - shell: 'echo "Tests Passed"'
+# Build status is always success due conditional plugin prefetching
+# build status before multijob phases execute
+#        - conditional-step:
+#            condition-kind: current-status
+#            condition-worst: SUCCESS
+#            condtion-best: SUCCESS
+#            on-evaluation-failure: mark-unstable
+#            steps:
+#                - shell: 'echo "Tests Passed"'
+
+    publishers:
+        - groovy-postbuild:
+            script:
+                !include-raw-escape: ./update-build-result.groovy
 
 {% for stream in scenarios %}
 # {{ stream }} Daily
diff --git a/jjb/apex/update-build-result.groovy b/jjb/apex/update-build-result.groovy
new file mode 100644 (file)
index 0000000..a569e51
--- /dev/null
@@ -0,0 +1,4 @@
+import hudson.model.*
+if (manager.build.@result == hudson.model.Result.FAILURE) {
+    manager.build.@result = hudson.model.Result.UNSTABLE
+}