Octopus's config file variable substitution works only on the setting key
, not the value. If you create a setting like:
<add key="Octopus.Environment.Name" value="..." />
then the value
will be set at deployment time.
What you're attempting with the other approaches is reasonable of course, but not how Octopus currently works with config files.
We've enhanced our variable substitution processing in 2.0 with a new parser and new capabilities (#{if ...
, #{each
and so-on) - your question inspired me to draft up this proposal which might address this usage better.