Take a look at this and see if it helps:

https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy#L227

If you call JUnitArchiver from inside a pipeline, I think it
throws an exception if there is a test failure.
You need to catch the exception, explicitly set currentBuild.result to
FAILURE,
and then re-throw the exception.

It took me a long time to figure it out. :)

--
Craig


On Thu, Apr 7, 2016 at 1:17 AM, Frank Hask <[email protected]> wrote:

> Hi all,
>
> i am creating build pipeline and i am stuck at the integration tests stage.
>
> This stage generates junit test results in XML format and if there are
> some failures pipeline just ignores it and continue as usual. But i want to
> stop pipeline and mark it as failure on test failure.
>
> I have exhausted all possible ways so i am posting this topic in hope that
> someone has figured this out and wants to share it with community.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/7f0fde36-5c82-4fe4-8aa0-65e47f8aa379%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/7f0fde36-5c82-4fe4-8aa0-65e47f8aa379%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVd5%2BbkOEjyi1QfRTKS-8rDykdzFpz%2BbpYCGaGoL8i_vgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to