Can you specify a variable under Host in IIS Binding?

Hello. I’m trying to set up a binding in OD, which needs to change based on the environment it is being deployed to. For example:

On Dev, the binding host should be sitename.dev…cdle.int.
On Test, it should be sitename.test.cdle.int
On Prod, it will be sitename.cdle.int

My proposal is to make a variable that has ‘dev.’, ‘test.’, and ‘’ as values for each of the three environments, called, say, hostEnvironment, and then plug in sitename.#{hostEnvironment}cdle.int as the name of the host under IIS Bindings under the Deploy Package step.

The problem is that when I try this on my project, it deploys it to sitename.#{hostEnvironment}cdle.int, instead of transforming #{hostEnvironment}. Am I trying to do something not supported, or am I doing something wrong?

Hi Jeremy,

Thanks for reaching out! Could you please follow these steps so we can help with the troubleshooting:

  1. Add these 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.

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

Thanks!

Dalmiro

Thanks for the quick reply. Turns out the problem here was a loose nut behind the keyboard (i.e., me), and I fixed it. Note: Don’t name variables #{variable}. That breaks things…

Glad to hear you solved it! We are all guilty of having named variables #{Variable}, #{var} & #{v} at least a couple times in our lives :wink: