Templates as a config respository

12 views
Skip to first unread message

Hans Dampf

unread,
Jul 25, 2024, 8:02:38 AMJul 25
to go-cd
Hi,

because we have our templates for the pipelines in gitlab and there is currently a copy job for it to transfer the saved templates on to the gocd master server.

Is there a way to configure this in the same way as pipelines and env config as a config repository?

Regards

Chad Wilson

unread,
Jul 25, 2024, 11:46:25 AMJul 25
to go...@googlegroups.com
Hiya Hans

Its not possible to directly define GoCD templates as 'pipelines as code', assuming that is what you are referring to.

You could
- build custom automation triggers that update source controlled JSON templates via GoCD APIs
- or you could explore config repo plugins that better support templating conceptually (e.g Groovy, jsonnet - but come with their own downsides)
- or you could use an intermediary step to translate your templates to regular yaml|json config repo format
- write your own config repo plugin 😅

See https://github.com/gocd/gocd/issues/5675 fir some more discussion/background.

-Chad

--
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/8e2c66a9-1904-4815-8aac-e2a7f2dfc2cfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages