Is it possible to use variables in XML config transformations?
To my knowledge the short answer is No. However you can use Powershell to do something close to the goal I believe you are attempting to get. I have a powershell script that uses special naming to modify config files outside of the regular Octopus Deploy variable transformation.
It’s not normal web transformation but it gets the job done. Setup a variable in your Octopus project like: “log4net://configuration/log4net/appender[@name=‘FileAppender’]/file/@value” = “path to your log file”
Then run the script and it will use the first part (before the ‘:’) to determine which config file to apply the variable too. Then it uses the XPath (part after ‘:’) to locate the appropriate node.
The gist above has a sample config file and sample setup of the Octopus parameters. I’m on the jabbr board if it gives you any problems.
Using your script as a module in OD, slightly modified, but overall same basis.
Thank you!