-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
Jenkins 1.639
build.state.result should return FAILURE in the guard block, but always returns SUCCESS.
Script
import hudson.model.Result def run_builds(){ parallel ( { ignore(FAILURE) {build("Tests/TestSuccess")} build("Tests/TestSuccess") }, { build("Tests/TestSuccess") build("Tests/TestFailure") }, )} guard { run_builds() } rescue { out.println "Result should be FAILURE but is $build.state.result" }
Output console
guard {
parallel {
Schedule job Jenkins internal tests » TestSuccess
ignore(FAILURE) {
Schedule job Jenkins internal tests » TestSuccess
Build Jenkins internal tests » TestSuccess #20 started
Build Jenkins internal tests » TestSuccess #20 started
Jenkins internal tests » TestSuccess #20 completed
Jenkins internal tests » TestSuccess #20 completed
// SUCCESS ignored
}
Schedule job Jenkins internal tests » TestFailure
Schedule job Jenkins internal tests » TestSuccess
Build Jenkins internal tests » TestFailure #12 started
Build Jenkins internal tests » TestSuccess #21 started
Jenkins internal tests » TestFailure #12 completed : FAILURE
Jenkins internal tests » TestSuccess #21 completed
}
} rescue {
Result should be FAILURE but is SUCCESS
}