GoCD scripting

115 views
Skip to first unread message

John Test

unread,
Jun 30, 2016, 11:41:41 AM6/30/16
to go-cd
Hello

I am a little confused reading the docs its not clear what types of scripting can I do with Go.
My team has standardized on Bash/Python/YAML. Can we use Go as per this requirement?

Thanks
John

Aravind SV

unread,
Jun 30, 2016, 12:03:36 PM6/30/16
to go...@googlegroups.com
Hello!

It depends on your definition of "scripting", but if you're looking to orchestrate existing scripts using GoCD, then yes, any of those should do. I'm curious about which documentation you read, and what made it unclear. For instance, in the Getting Started documentation, it mentions being able to use any commands when bringing up the task concept. If you can help with some information about the documentation you read, maybe we can improve it.

If, by scripting, you mean using the APIs, there are HTTP(s) endpoints and some wrappers (like gomatic, yagocd, py-gocd) written and maintained by members of the GoCD community.

Cheers,
Aravind


--
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.

John Test

unread,
Jul 2, 2016, 11:50:15 PM7/2/16
to go...@googlegroups.com
I saw Ant being mentioned and commands. I wasn't clear what kind of commands it is talking about.
Unless I overlooked, I didn't see it specifically mention "any installed language" or Bash or Python.

Since I am new to CI/CD, I am also trying to learn some of these concepts. So I apologize for elementary questions.

As an example, Jenkins pipeline requires Groovy. We can add shell commands inside Groovy but the wrapper remains Groovy.
Is there something like this going on with GoCD?

The question simply put: what do I need to know to build a pipeline with GoCD?
Is this simply working with the WebUI point and click create stages and inside those stages put any kind of code?


Thanks




--
You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/4_cqIot-EO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to go-cd+un...@googlegroups.com.

David Rice

unread,
Jul 3, 2016, 9:44:57 AM7/3/16
to go...@googlegroups.com
Hi John -

In terms of scripting or programming languages, you don't need to know anything. In fact, GoCD *cannot* be scripted. It can only be configured to execute your scripts and programs. (I'd suggest it's a good thing to keep your scripts decoupled from your CI/CD tool.) 

There are a few things in the UI that make invocation of Ant or Rake a little easier, but for the most part you will be configuring a "Custom Command" that instructs GoCD how to run your scripts. Configuration can be through the UI or direct editing of the server's configuration XML. 16.6 has experimental support for putting pipeline configuration in your source repositories.  That should firm up over the next couple of releases.

I'd highly recommend working through the reading and example in our Getting Started material.  It will very quickly walk you through what working with GoCD will feel like.

Hope that helps,
David


John Test

unread,
Jul 3, 2016, 11:29:09 AM7/3/16
to go...@googlegroups.com
hi David,

I think this answers my question

"Configuration can be through the UI or direct editing of the server's configuration XML"

So if we just want to stick with Bash/Python, then we simply call it via GoCD.
And it's possible we might have to do some configs via XML.

Did I get that right?

Thanks

David Rice

unread,
Jul 3, 2016, 11:42:09 AM7/3/16
to go...@googlegroups.com
Yep.  Expect I meant through the pipeline editing UI *OR* direct editing of the server's configuration XML.  Sorry about my fat fingering :)

John Test

unread,
Jul 3, 2016, 12:00:48 PM7/3/16
to go...@googlegroups.com
Yes I understood :) Thanks David.
Reply all
Reply to author
Forward
0 new messages