Custom install directory containing parameters?

Hi,

In my “Custom install directory” step I need to have the path depend on a parameter, more specifically $OctopusParameters[‘Octopus.Release.Number’].

However it is not used - Octopus creates a directory called “c:$OctopusParameters[‘Octopus.Release.Number’]”…obviously I wanted something like “c:\4.1.1.0” for example.

How to do this?

Hi,

Thanks for getting in touch.

Depending on the context where you are using the Octopus variable, the way you use it may vary from $OctopusParameters[Variable] to #{Variable}. Since its a bit tough (even for us) to remember on which context you have to use which method, we solve this by providing a list of variables at the right side of the field. By selecting a variable from it, Octopus will automatically add it with the right syntax.

In your case the right syntax for that field would be c:\#{Octopus.Release.Number}

See attached GIF so all I’m saying makes a bit more sense.

Hope that helps!
Dalmiro

Ok I did not know about the context - could explain some other issues I had :slight_smile:
Thanks Dalmiro…