Using a declarative pipeline, I have a many stages, including 8 that involve testing in which standardized results are published via the junit publisher. Unfortunately, any test failures in any stage automatically mark all stages as unstable (ugh). In an attempt to post meaningful results to slack at the end of each stage, I'd like to include the name of the stage and the test metrics unique to that stage.
But it seems that the currentBuild object would only have the aggregate. Was hoping there was an API that could be used in the "post -> always" section of my stage in which I could gain access to the test counts that occurred (and were published) in that stage.
If so, I could send to slack under my own control.