Why custom config variable changes run on every .config file

I am working on setting up a deployment project for my team. I have bunch of transformation files that I need to run first, and then I want database connectionStrings be changed according to a scoped variable i define in Octopus. But, in Octopus custom variable changes occur in every .config file, including my transformation config files. Is there any way to change variables in one particular config file?


Hi Aizhuldyz,

Thanks for getting in touch.

The ordering of the transformation steps mean that your transforms should run first, then the appsettings and connectionStrings should run after that. So the end result should be correct even if the transform files are modified. We’ve got that documented here http://docs.octopusdeploy.com/display/OD/Package+deployment+feature+ordering

If that’s not happening and your end result is wrong then it may be a bug, are you able to attach a deployment log so we can see ?

Kind regards


Hi, thanks for your reply! Yes, the order is not my problem. In my project folder I have multiple transformation files which are supposed to run when my project is deployed to different environments. My problem is that after the one transformation file is run (e.g. in Test env app.test.config) the connectionStrings run and change my app.config along with all the transformation files. My transformation files are big in size and have settings that match the connectionStrings defined in octopus. So, is there a way to tell octopus to change the variables only in app.config, and not to touch my tranformation files. I know it might sound wrong, but in the future my team wants to be able to change the connection Strings automatically with your API, for instance when database location changes.

Hi Aizhuldyz,

I don’t think you need to worry, when you deploy to a different environment, Octopus will redeploy the package and run the transforms again for that environment.
Likewise, if you change a connection string later, you’d create a new release and it will be redeployed.

Does that make sense ?