Built-in Octopus variables are not substituted in .config files

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.

Hi,

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:

Hope that helps!

Paul

Hi Paul,

That doesn’t seem to work on .config files. I get an XML parsing error when I try to do it.


Nick Berardi
(484) 302-0125
Sent on the go from my phone.

Hi Nick,

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.

Regards,
Nick

I will and thanks.


Nick Berardi
(484) 302-0125
Sent on the go from my phone.