Hello Helge,

If the scripting code and the pipelines-as-code code is in the same branch 
of the same repository, then the config-repo-material type 
<https://github.com/tomzo/gocd-yaml-config-plugin#configrepo> might be 
useful. That will allow you to reference and use the material and branch of 
the config repository inside the YAML or JSON.

If not, and if you are comfortable using Groovy, maybe the groovy 
config-repo plugin 
<https://github.com/gocd-contrib/gocd-groovy-dsl-config-plugin> will give 
you more flexibility.

The plugin endpoint (plugin infrastructure) from the GoCD server side does 
allow plugins to accept arbitrary configuration ("instance specific 
properties" as you said), but the plugin will then need to accept it and 
make sure it is available in the context to be used in the YAML or JSON, 
for instance. It'll be a conversation you need to have over in the issue 
section of the plugins, to see if there is appetite to do that. Maybe a PR 
will be accepted. Templating, which is related to what you're asking about has 
been talked about before 
<https://github.com/tomzo/gocd-yaml-config-plugin/issues/2>, for the YAML 
plugin. Maybe that conversation is relevant to you.

Finally, about encrypted values across different instances, you should 
probably look at secrets management 
<https://docs.gocd.org/current/configuration/secrets_management.html>.

Cheers,
Aravind


On Thursday, June 4, 2020 at 1:04:08 PM UTC+1, Helge Walter wrote:
>
> Hello,
>
> we use GoCD as a shared service for our companies internal application 
> provider and we develop scripting, pipelines and plugins for common usage. 
> So we have a GoCD test environment and a GoCD production environment.
> What we want to achieve is that we develop scripting (in a development 
> branch) and pipelines as code (also in the development branch) and for 
> production we want to have the same setup but using the master branch. The 
> scripting repository is referenced in the pipelines as code as materials.
> Here we can setup the config repository in the different GoCD environments 
> with different branches. But the pipelines as code directly contain the 
> branch to be used for the materials. How can I achive this?:
>
>    - Different material branches across different GoCD instances
>    - Different material user/PWs across different GoCD instances
>    - Encrypted values across different GoCD instances (encryption is 
>    specific per GoCD instance)
>
> Is there some facility to specify GoCD instance specific properties which 
> can be used in pipelines as code?
>
> Is there another solution how to make it possible to test pipelines as 
> code  w/o affecting production use?
>
> Thanks in advance!
> Helge
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/bbe5a941-d125-4d17-8fe4-b0f017cd4d76o%40googlegroups.com.

Reply via email to