tomzo/gocd-yaml-config-plugin

Cannot refer elastic_profile_id to an environment variable.

worapojc opened this issue · 2 comments

Hi,

I'm trying to keep the elastic agent profile name in GoCD's environment.

Then, each config repository will have dedicated environment for its.

I tried to refer the elastic_profile_id with an environment variable but it's not working.

For example, elastic_profile_id: ${env:AGENT_NAME}.

How can I refer the environment variable for the property? or Is it limitation?

An environment variable in GoCD is only created and is available at runtime (provided to a task), and not at configuration time. So, that won't be possible. At the time this configuration is parsed and the pipeline created, there is no agent.

Thanks @arvindsv. I already requested a feature proposal gocd/gocd#10864.