Add XmlPoke feature for setting random config values using XPath
It would be nice to be able to set random values in the config files using an XmlPoke type feature where you could specify XPath expressions that point to values in the config file and then specify values to set them to.
Here is an example to set the compilation debug to false:
This would allow setting random values throughout the config file without having to use config transforms.
This is now possible with the structured configuration variables feature (https://octopus.com/docs/deployment-process/configuration-features/structured-configuration-variables-feature#xml) shipped in Octopus 2020.4
I would say that along with the variable definitions, to have a xpath statement that would update the value at deployment time.
Variable, Value, Scope, X-Path Transform Statement
Dmitriy Reznik commented
I'd like it as well
Daniel Blendea commented
I support this functionality.
Having a second .config file with values set to Octopus variables it means there's one extra file to manage, per deployed package.
We are bound by some security policies to avoid keeping passwords and other sensitive information in the web.PROD.config file. And they are known only by the build engineers responsible for the PROD releases.
Sergio Acosta commented
Great idea. This would save a lot of work regarding xml config transformation files!