How to continue to next stage automatically , even if previous stage is failed

386 views
Skip to first unread message

suman gs

unread,
Aug 2, 2021, 5:57:43 AM8/2/21
to go-cd
Hi All,

I am new to the GOCD , Can any one help me  on the below query,  

Q) In a pipeline ,How can we  continue to next stage automatically  , when previous stage is failed.

Thanks
Suman

Jason Smyth

unread,
Aug 3, 2021, 9:25:00 AM8/3/21
to go-cd
Hello Suman,

To the best of my knowledge there is no way to do this natively in GoCD. You could probably fake it by building something that continually checks for failed Stages and triggers the next Stage when it finds one but I question why someone would want to do this.

The way I tend to think about Stages in GoCD is that each one represents a self-contained process that proves that the release candidate passing through it is suitable for production in some way. Once a release candidate passes through all of the Stages in the Pipelines that drive it, we know it is good to release to production. If the candidate fails at any point, though, it will never be released to production so there is not much value in continuing with any Stages after the one that failed.

Could you elaborate a bit on your model and why you would want to run the next Stage even if the current Stage fails?

Regards,
Jason

suman gs

unread,
Aug 4, 2021, 4:04:32 AM8/4/21
to go-cd
Hi Jason,

Thanks for the suggestion.

We are performing Test execution with modular approach ,here we have built different stages and the condition here is it has to run sequence only, even if one modular fails at least it should execute another stage. For this reason I was looking that option.

Regards,
Suman

cal...@vertify.com

unread,
Aug 4, 2021, 2:29:14 PM8/4/21
to go-cd
To handle your case, perhaps you could setup your stage scripts so that they always reports success to GoCD, and then figure out a way to handle failures. For example have an API server that one stage can report status to, and that other stages can then query to control flow. We have used this method successfully to workaround limitations in GoCD.
Reply all
Reply to author
Forward
0 new messages