Hi!
We’re using “component.variable” notation for our variables in Octopus:
I defined test.var = “test var"
And changed my Powershell script from Nuget to use this var:
------------- Script excerpt
[CmdletBinding()]
param(
[string]$envPrefix = $envPrefix,
{…}
[string]$dotVar = ${test.var} # here
)
write-host " Test Dot Var:[$dotVar]”
------------------------- end script excerpt
But in octopus log when running this step I see output:
Test Dot Var:[]
How could I use dotted vars correctly by passing them from Octopus to Powershell script?
PS: All other vars defined in Octopus are working smoothly e.g.
If I define in Octopus vars: envPrefixFromOctopus = “something” it’ll work correctly:
------------- Script excerpt
[CmdletBinding()]
param(
[string]$envPrefix = $envPrefixFromOctopus # this one is working OK
)
write-host “EnvPrefix:[$envPrefix ]”
------------------------- end script excerpt
"EnvPrefix:[something]"
Thanks!