On Tue, Mar 22, 2016 at 4:47 AM, domi wrote:
> if(currentBuild.result != null &&
> !"SUCCESS".equals(currentBuild.result)) {
> ...
> }
Yes that is the current recommendation.
--
You received this message because you are subscribed to the Google Groups
Thanks!
For now I go with this (I hate whitelisting...):
if(currentBuild.result != null && !"SUCCESS".equals(currentBuild.result)) {
...
}
> On 22 Mar 2016, at 09:42, Robert Sandell wrote:
>
> Pro tip, requires some "custom whitelisting":
>
>
Pro tip, requires some "custom whitelisting":
AbstractTestResultAction testResultAction = currentBuild.rawBuild.getAction(
AbstractTestResultAction.class)
if (testResultAction != null) {
echo "Tests: ${testResultAction.failCount} ${
testResultAction.failureDiffString} failures of ${
OK sorry for the confusion,
but you should be able to do what you do (so it doesn't fail on the sh
step, but then marks the build as UNSTABLE in the junit archive step).
Then currentBuild.result should have the current build status (or another
item in currentBuild, sorry am not sure).
On
Right but then without the step failure how can you trap the failure to
send the failure email (seems clumsy to have to let the step fail, and then
record archive results in the exception handler).
On Tuesday, March 22, 2016 at 2:51:31 PM UTC+11, Andrew Bayer wrote:
>
> I think the Junit
That would be preferable if so (in that case you don't want your shell step
to error out, yes).
On Tuesday, March 22, 2016 at 2:51:31 PM UTC+11, Andrew Bayer wrote:
>
> I think the Junit result archiver should mark the build as unstable if
> there are failures...
> On Mar 21, 2016 7:16 PM,
I think the Junit result archiver should mark the build as unstable if
there are failures...
On Mar 21, 2016 7:16 PM, "Michael Neale" wrote:
> I am assuming that ignoring test failures doesn't make the shell step
> fail? (Ie it returns a success code?)
>
> If so, removing
I am assuming that ignoring test failures doesn't make the shell step fail? (Ie
it returns a success code?)
If so, removing that and putting try/catch around it and then the archive step
in the exception handler along with email could work. There may be a better way
though (as that seems
Hi,
I’m trying to find a way how I can react on test failures. e.g. I run maven
with the flag to ignore test failures so the job does not stop. But in case a
test failure was discovered, I would like to send a mail or chat message - how
can I do that?
sh 'mvn clean install -B