Conditional BuildStep Plugin don't fail the build

83 views
Skip to first unread message

Stefano

unread,
Dec 2, 2016, 3:44:05 AM12/2/16
to Jenkins Users
Hello, i have a problem with Conditional BuildStep Plugin, i have set the regex matching rules and work, but if i chose "On evaluation failure" "Fail the build" or "Mark the build unstable", the build stop and is marked as "SUCCESS"....instead  of a red ball i have a blue ball

Daniel Beck

unread,
Dec 2, 2016, 7:10:50 PM12/2/16
to jenkins...@googlegroups.com
'on evaluation failure' means 'when the regex is invalid'. It's not "when it doesn't match".

> On 02.12.2016, at 09:44, Stefano <stefano....@gmail.com> wrote:
>
> Hello, i have a problem with Conditional BuildStep Plugin, i have set the regex matching rules and work, but if i chose "On evaluation failure" "Fail the build" or "Mark the build unstable", the build stop and is marked as "SUCCESS"....instead of a red ball i have a blue ball
>
> --
> 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 jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/72854815-bd34-44a7-a69d-9722da49c361%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Stefano Cognigni

unread,
Dec 5, 2016, 3:19:12 AM12/5/16
to jenkins...@googlegroups.com
there is a way to mark the build as failed?

Christoph Nenning

unread,
Dec 5, 2016, 3:31:50 AM12/5/16
to jenkins...@googlegroups.com
Hi,

> there is a way to mark the build as failed?

You could throw a (groovy) exception


Regards,
Christoph

> d/msgid/jenkinsci-users/bbf48f3a-b42e-9eb1-186c-23a05bbc7c71%40gmail.com.
> For more options, visit
https://groups.google.com/d/optout.


This Email was scanned by Sophos Anti Virus

jer...@bodycad.com

unread,
Dec 5, 2016, 11:12:15 AM12/5/16
to Jenkins Users
you can use direct assigantion to currentBuild result variable:

currentBuild.result = 'FAILURE'

avaiable value are (not sure I got them all): 
'UNSTABLE', 'SUCCESS', 'FAILURE', 'ABORTED', 'NOT_BUILT'

Reply all
Reply to author
Forward
0 new messages