I recently read this discussion here, but I have a slight different problem. I am using a toolset called Exceptionless, and they provide a custom config section like this:
<exceptionless apiKey="#{Exceptionless API Key}" />
How would I use the custom variables. I am trying to stay away from deploying these as transformations because the key is sensitive and I don’t want to include it in the source control.
Thanks for the question. You can create a variable called “ExceptionlessKey”, and mark it as sensitive in the Octopus UI on the Variables tab. Octopus will store the value encrypted, and won’t allow anyone else to view it.
You can then use the variable as #{ExceptionlessKey} and Octopus will replace it, assuming you use this feature:
In Octopus 2.4 we’ve changed the order in which substitutions are applied. They would previously be run after the various XML configuration steps, while in 2.4 they’ll run before to eliminate this kind of issue.
The new build will be up as a pre-release in the next day or so, let me know if it helps.