In Octopus Server we have set the variables as follows
ApplicationInsights:InstrumentationKey
Octopus:ServerAddress
Octopus:ApiKey
The ApplicationInsights.InstrumentationKey replacement works fine but neither of the Octopus.*
variables are replaced. They remain unchanged after the deployment.
The log clearly shows that the replacement has found and worked on the appsettings.json
11:58:46 Info | Performing JSON variable replacement on 'C:\Octopus\Applications\Dev\MyApp\1.0.0.20_3\appsettings.json'
I had a look at the “JsonConfigurationVariableReplacer” and could see no indication of “Octopus” as a reserved word.
Thanks for getting in touch, and sorry for the confusion on this one!
You’re theory that Octopus was a reserved word is correct, it was just hiding down on line 185. If you remove Octopus from the variable names you should be good to go.
Please let me know if there is anything else I can help with.