Can a pipeline (one stage) run more multiple instances at the same time?

210 views
Skip to first unread message

Tony Wei

unread,
Feb 12, 2016, 9:18:29 AM2/12/16
to go-cd
For example, when the pipeline is running an instance, a new Pull Request happens, then the pipeline detects the new Pull Request and then starts the second instance for the new Pull Request even when the first instance is not finished yet. 

I tried releasing the pipeline lock through GoCD API and got no lock exists within the pipeline configuration but it didn't work.

Please advise. Thanks!

Padma Mullagiri

unread,
Feb 15, 2016, 4:14:39 AM2/15/16
to go...@googlegroups.com
Hi Tony,

Please note this message "no lock exists within the pipeline configuration" appears when there is no lock existing for the pipeline(i.e. automatic pipeline scheduling is not checked in pipeline setting) which you are trying to release when you hit the API.

Coming down to running multiple instances of same stage at the same time is not possible to run i.e.  Pipeline1 can have multiple instances running at the same time, but the same stage of two different pipeline instances will never run in parallel. Lets say, pipeline1-stage2 is running with pipeline counter 10. At the same time a new instance of pipeline1 could be triggered say counter 11. Now stage1 of counter-11 finishes, but stage2 of counter-10 is still running. Go will wait for stage2 of counter-10 to finish before it schedules stage2 of counter-11. 

And the release lock API is used only when there is failure(or cancellation) of one or other stage in a pipeline and if you want to re-run the pipeline immediately with changes or fixes by unlocking it.

Hope this above information helped you.

Thanks,
Padma



--
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 go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Wei

unread,
Feb 15, 2016, 7:49:42 PM2/15/16
to go-cd
Thanks. It makes sense.
Reply all
Reply to author
Forward
0 new messages