How to replace config values with output from other steps

I have a step that generates the connection string value based on some input. This value is saved in a variable using:

Set-OctopusVariable -name “ConnectionString” -value “Data Source=…”

Later on I have a step that creates an Azure Web App with the Configuration Variables Feature enabled. I would expect variables to be set using Powershell to also be replaced, but this is not happening.

Am I doing something wrong is this is not supported?

Hi,

Thanks for reaching out. How are you referencing the variable created by Set-OctopusVariable in the config file? You should do it following the format mentioned on the link below (referencing the name of the step where you created the variable in the variable name).

If that doesn’t help, please follow the below steps to send me deployment log, and also send your Azure webapp config file.

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

THanks!
Dalmiro

Yeah I was expecting it to work with #{VariableName}. It’s fixed now, thanks!