Hi all,
I'm currently using a python script to generate a .gocd.yaml file, containing a collection of pipelines.
I'm now looking at ways to handle multiple branches for a specific repository, with a pipeline per branch.
I figured I could use GoCD Templates (as in, the <templates> element) to take the stages and then use the parameters to control various minor differences, with materials specified in each pipeline from the template (unfortunately, I don't think I can put the materials in the template - right?)
I bumped into an issue when I discovered that I can't define a template using the YAML config plugin. This lead me to a series of issues/discussions/PRs on this and related topics:
https://github.com/tomzo/gocd-yaml-config-plugin/issues/211https://github.com/gocd/gocd/issues/6123#issuecomment-547636050 (seems this would work, but requires Groovy DSL plugin?)
https://groups.google.com/g/go-cd/c/JalrejeFlOc/m/xpLsZGZLAgAJI can fairly easily expand my Python code to simply generate more pipelines (and then control whatever I want to share/not share, because it's expanded as a bunch of static strings before GoCD ever sees it), but then the addition/removal of any pipelines requires commits to the config-repo, and then updating on the server.
I was initially motivated to use templates on the basis that I thought I might be able to use the web UI to create new copies of a template (even one defined in a YAML file, back when I thought that was possible).
I note also that I can't clone yaml-defined pipelines to make a server-defined pipeline with editable fields.
How are people doing this kind of thing?
Should I just update the config-repo each time I need to add/remove a pipeline for a new/deleted branch?
Does anyone have opinions about the Groovy DSL plugin instead (and its applicability to this use case?)
Thank you if you read this far!
I suspect I'm doing something silly, or have a bad mental model, but with that in mind, I'm probably looking in the wrong places for solutions...
Best regards,
Christian