Is it Possible to Export a De-Normalized Pipeline Based on Template?

3 views
Skip to first unread message

Jason Smyth

unread,
May 15, 2023, 4:01:09 PM5/15/23
to go-cd
Hi everyone,

We have a GoCD instance with about 1200 pipelines, most of which are defined directly in the GoCD configuration XML file. Of the pipelines that are defined in the XML config, most are based on templates.

We are trying to migrate most, if not all, pipelines into (a) configuration repo(s), with the thought being to abandon templates altogether. Our management of templates has been poor historically, leading to template sprawl. We have 439 templates, of which 122 are unused.

Exporting pipelines to JSON or YAML is perfectly straight-forward. However, for pipelines that are based on templates, the export retains the template reference. Is there a way to export the de-normalized pipeline definition so that we do not have to hand-craft the JSON/YAML structure for each template?

I came across this GitHub issue. I am inclined to agree with the author that the correct default behaviour for export is to maintain the template reference; that is the true representation of the pipeline's configuration. However, since we are looking to move away from using templates, it would be nice if there were an easy way for us to export the merge of the pipeline and its associated template.

I also came across this mail list conversation but it, along with the links it contains, is mostly about support for templates defined in the config repos.

Does anyone have any ideas on how we can easily accomplish our goal?

Any thoughts or guidance welcome.

Regards,
Jason

Reply all
Reply to author
Forward
0 new messages