Hi Kritika,
Thanks for this tidbit. This does help.
Regards,
Sekhar Routray
On Friday, 12 June 2020 15:05:37 UTC+5:30, Kritika Singh wrote:
>
> Hi Sekhar,
>
> GoCD fails a job when a given task fails, i.e. if you execute a command
> which result in a non-zero value - the task has failed and so the job will
> fail.
> E.g.
> <exec command="/bin/bash">
> <arg>-c</arg>
> <arg>if [ \"${SHOULD_FAIL}\" != 'true ]; then echo
> \"Failing the job\"; exit 1; fi</arg>
> </exec>
>
> Hope this helps!
>
> Kritika
>
> On Friday, June 12, 2020 at 1:07:24 PM UTC+5:30 [email protected] wrote:
>
>> Hi,
>>
>> I'm quite new to GoCD and I'm trying to figure out if it possible to
>> break a build pipeline or forcibly fail a pipeline based on a condition?
>>
>> My exact requirements are to declare a threshold variable and if that
>> threshold is crossed the stage/pipeline is to be failed forcibly and the
>> subsequent execution of pipeline is stopped.
>>
>> And if there are conditional statements(like if else) or support for
>> logical statements(like &,&&,|,||,<,<=,>,>= etc) it makes the job easier
>> for me as I can control the flow control to stages or other pipelines.
>>
>> Thanks in advance.
>>
>> Regards,
>> Sekhar Routray
>>
>
--
You received this message because you are subscribed to the Google Groups
"go-cd" 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/go-cd/2eaba958-4770-4aa5-be9c-b9cb9c080f0ao%40googlegroups.com.