-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.89.3
The problem is that our Jenkins file is using parallel() and executes several maven builds (using withMaven).
We then have some custom logic after each maven execution to analyze failing tests. The problem is that they accumulate in "currentBuild" and we cannot find the tests related to the maven execution that just happened.
FYI the way we retrieve failing tests is:
AbstractTestResultAction testResultAction = currentBuild.rawBuild.getAction(AbstractTestResultAction.class) def failedTests = testResultAction.getResult().getFailedTests()
See also https://groups.google.com/forum/?nomobile=true#!topic/jenkinsci-users/dDDPC486JWE
I've tried to put some logic to save failing tests before and after each maven execution but it cannot work because of "parallel" (all maven executions starting in parallel save an empty state of failing tests and as soon as one of them gets a failing test, they'll all report it failing and send duplicate emails):
- https://github.com/xwiki/xwiki-jenkins-pipeline/blob/master/vars/xwikiBuild.groovy#L112
- https://github.com/xwiki/xwiki-jenkins-pipeline/blob/master/vars/xwikiBuild.groovy#L210
So right now we're stuck and missing a way to get the test result for a single maven execution.
Thanks