Trigger pipeline either with bash or Python

29 views
Skip to first unread message

Sujad Syed

unread,
Dec 24, 2019, 6:04:29 AM12/24/19
to go-cd
Hi Team,

I am in the need of triggering a pipeline or releasing a pipeline using bash or Python
due to scheduled release once in 2 or 3 hours, Could you please suggest if its possible.

on a side note, I am updating cruise.xml through sed bash commands and then have to trigger the pipeline.

Akshay Dewan

unread,
Dec 24, 2019, 6:14:36 AM12/24/19
to go...@googlegroups.com
Hi,

The Schedule Pipeline API might be useful: https://api.gocd.org/current/#scheduling-pipelines

Regards

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/1bd5af8c-b88f-46cf-988a-955adf36f201%40googlegroups.com.


--
Akshay Dewan
Phone: +91 99201 57907
ThoughtWorks

Sujad Syed

unread,
Dec 24, 2019, 7:52:09 AM12/24/19
to go...@googlegroups.com
Thanks a lot,Appreciate your quick response,

Is it also possible to release a pipeline through Python, Could you please let me know.

Use case : If i have a bash script which checks whether the job is successful or not, if the job is successful it has to call the pipeline either through python or bash and trigger a release.


Akshay Dewan

unread,
Dec 25, 2019, 11:37:23 PM12/25/19
to go...@googlegroups.com
Hi,

Your use-case sounds like it can be modeled as a pipeline dependency without the need for additional tooling: https://www.gocd.org/getting-started/part-2/#concept_pipeline_dependency_material

I'm not aware of any python API other than gomatic, but I don't think it can trigger pipelines. You can always invoke the REST API from python.

HTH


Reply all
Reply to author
Forward
0 new messages