Hello Maxim,

On Mon, Sep 30, 2019 at 10:38:21 -0700, Maxim Shaev wrote:
> > Could you not reference the existing variable instead of creating a custom 
> > variable that contains the same data?
> 
> Unfortunately no, these variables are expected to get as environment 
> variables for k8s manifest template to prepare the manifest file.
> 
> Currently the issue is solved by Linux way to set env. variables before 
> command
> 
> e.g.
> 
> gocd_image_path=${IMAGE_PREFIX}/${GO_PIPELINE_NAME}:${GO_PIPELINE_LABEL} 
> dump-env --template=.env.dist --prefix='gocd_' > .env

Yes, GoCD doesn't substitute environment variables like $GO_PIPELINE_NAME etc. 
when defining other environment variables.

However, as documented at 
https://docs.gocd.org/current/faq/dev_use_current_revision_in_build.html, it is 
possible to get bash to do that for you. It also gives you much more 
flexibility, since it allows you to do things like: ${ENV_VAR:-default}.

In your case, as long as the command is "sh" or "bash" and the first argument 
is "-c", you should be able to use exactly what you showed there.

Cheers,
Aravind

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/20191001114451.2qdfk5dkrgiqguht%40arvindsv.com.

Reply via email to