Hi Nux,

Thanks for the reply. This logic worked for me.
Though I might not rely on Files/IO for the job output, however I have used
the same approach with System variables and worked fine for me.
For best output, I would still be seeking if there is any plugin which
permits the else condition as well.
Regards,
Sahil

On Mon, Oct 27, 2014 at 3:42 PM, Maciej Jaros <[email protected]> wrote:

>  Sahil Minocha (2014-10-16 13:50):
>
> Hi,
>
> I am using Conditional Steps(Multiple) and Steps to run if condition is
> met.
> I have a scenario to fail the build if an expression is not found in the
> Console Output.
> What I am able to achieve is, I can change the build output when an
> expression matches using Text FInder, however I need to do the vice-a-versa.
> I need to abort/fail the build if the regex does not matches the output.
>
>
> You can create a file if the condition was met (e.g. file
> "condition_x_matched"). Then add a Execute shell step and chaeck for the
> existance of the file. If the file does not exist - fail the build e.g. by
> doing `exit 1`.
>
> Regards,
> Nux
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/VZ6eKEMU1W4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> 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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to