Re: Jenkins Pipeline: How to fail on junit results

2016-04-29 Thread Craig Rodrigues
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

Re: Jenkins Pipeline: How to fail on junit results

2016-04-29 Thread John Long
You can use the junit reporting plugin to do this. Once you've installed it, you can call it with code like this: step([$class: 'JUnitResultArchiver', keepLongStdio: true, testResults: 'target/test-reports/TEST*.xml']) The snippet

Jenkins Pipeline: How to fail on junit results

2016-04-07 Thread Frank Hask
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