Octopus variables not being translated into values - Powershell

Hi, I have another issue with the Custom deployment scripts.

I use the box on the right to pick an Octopus variable, so in this instance for example it is: $OctopusParameters[‘Octopus.Action[Deploy PriceStrat Upgrade].Package.NuGetPackageId’]

But when this is being ran, it it just generating a .ps1 scrip that has this in the script rather than the value of the Package.NuGetPackageId

Am I reading the functionality wrong or should this OctopusParameter not be replaced during run time with the correct value??

Hi Gavin,

Thanks for reaching out. That variable should do the trick. Could you please follow these steps to help us troubleshoot this?

  1. Add these 2 variables to your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

  2. Create a new release (so the new variables take effect) and deploy it. If possible skip as many steps as you can and only leave step we are troubleshooting in order to avoid the noise in the log.

  3. Send us the raw log of that deployment http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

FYI that variable will return the ID of the package, and not the version. For a package called MyApp.1.0.0.nupkg you can use these variables to get data from it:

$OctopusParameters['Octopus.Action[Deploy].Package.NuGetPackageId'] -> “MyApp”

$OctopusParameters['Octopus.Action[Deploy].Package.NuGetPackageVersion'] -> “1.0.0”