summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-08-02 14:55:51 -0400
committerTim Rozet <trozet@redhat.com>2017-08-02 14:55:51 -0400
commit2b13f8ee486f4f8ae1c66ac3b95148d9a423318b (patch)
tree01720a7c4b50fda297a484187c6c256e9c1a18de
parenteeec59f7b8d501a62c9a89a34300047fd45c69cd (diff)
Apex: fix groovy build result update
The groovy script is working, but it is changing the 'apex test suite' phase to unstable and we really want it to change the 'scenario' job result to unstable if deploy passed but tests failed. Therefore this patch moves the groovy plugin to execute on the scenario job, and looks for deploy successful before changing the build result. Change-Id: I1b6907f4fb2647e644c4a627be6e481fff32f195 Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r--jjb/apex/apex.yml16
-rw-r--r--jjb/apex/apex.yml.j216
-rw-r--r--jjb/apex/update-build-result.groovy3
3 files changed, 10 insertions, 25 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 98a19d43d..d4ae54f9f 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -681,6 +681,10 @@
abort-all-job: true
git-revision: false
+ publishers:
+ - groovy-postbuild:
+ script:
+ !include-raw-escape: ./update-build-result.groovy
# Baremetal test job
- job-template:
@@ -757,13 +761,6 @@
enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
abort-all-job: false
git-revision: false
- - conditional-step:
- condition-kind: current-status
- condition-worst: SUCCESS
- condtion-best: SUCCESS
- 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:
@@ -774,11 +771,6 @@
# steps:
# - shell: 'echo "Tests Passed"'
- publishers:
- - groovy-postbuild:
- script:
- !include-raw-escape: ./update-build-result.groovy
-
# danube Daily
- job-template:
diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2
index a3cc9c658..5d7f150cd 100644
--- a/jjb/apex/apex.yml.j2
+++ b/jjb/apex/apex.yml.j2
@@ -611,6 +611,10 @@
abort-all-job: true
git-revision: false
+ publishers:
+ - groovy-postbuild:
+ script:
+ !include-raw-escape: ./update-build-result.groovy
# Baremetal test job
- job-template:
@@ -687,13 +691,6 @@
enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
abort-all-job: false
git-revision: false
- - conditional-step:
- condition-kind: current-status
- condition-worst: SUCCESS
- condtion-best: SUCCESS
- 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:
@@ -704,11 +701,6 @@
# steps:
# - shell: 'echo "Tests Passed"'
- publishers:
- - groovy-postbuild:
- script:
- !include-raw-escape: ./update-build-result.groovy
-
{% for stream in scenarios %}
# {{ stream }} Daily
- job-template:
diff --git a/jjb/apex/update-build-result.groovy b/jjb/apex/update-build-result.groovy
index a569e51f8..1679582c8 100644
--- a/jjb/apex/update-build-result.groovy
+++ b/jjb/apex/update-build-result.groovy
@@ -1,4 +1,5 @@
import hudson.model.*
-if (manager.build.@result == hudson.model.Result.FAILURE) {
+if (manager.logContains("^.*apex-deploy-baremetal.*SUCCESS$")
+ && manager.build.@result == hudson.model.Result.FAILURE) {
manager.build.@result = hudson.model.Result.UNSTABLE
}