diff options
author | Tim Rozet <trozet@redhat.com> | 2017-07-20 12:04:44 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2017-07-27 16:42:04 -0400 |
commit | 3db0c0da006cd112c3663e2f4b0b47e073fd5420 (patch) | |
tree | a448e523b5ae39b0d7b78fae613ad9f0ef654edc /jjb | |
parent | e40b4822ef070b7d5b09d6a93a1052a7dd77f6ad (diff) |
Apex: changes build result using groovy-postbuild
Conditional plugin does not work for detecting current status in
mulitjob, but groovy publisher does. Shown to be working in sandbox
job:
https://sandbox.opnfv.org/view/All/job/test_groovy_publisher/17/
Change-Id: Ic0ed09885bb29254c4bfda24164c5358eda0d20a
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/apex/apex.yml | 14 | ||||
-rw-r--r-- | jjb/apex/apex.yml.j2 | 14 | ||||
-rw-r--r-- | jjb/apex/update-build-result.groovy | 4 |
3 files changed, 32 insertions, 0 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index fd4dc9ff5..8f8aa56d2 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -750,6 +750,20 @@ 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 diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index d7b67c344..a3cc9c658 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -694,6 +694,20 @@ 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 index 000000000..a569e51f8 --- /dev/null +++ b/jjb/apex/update-build-result.groovy @@ -0,0 +1,4 @@ +import hudson.model.* +if (manager.build.@result == hudson.model.Result.FAILURE) { + manager.build.@result = hudson.model.Result.UNSTABLE +} |