Any way to reuse config transformations across environments?

I posted a feature request on uservoice:

Basically, I would like to reuse config transforms (Web.Dev.config) across different Octopus Environments (“Dev1” and “Dev2”) to avoid copy-pasting every transform file twice. The only workaround I see is to register every machine in the same “Dev” environment and use the new 2.3 feature of deploy to specific machines specifying only the machines I want to update, but this solution relies on the person who is triggering the deployment to always specify without error the same subset of machines.

Is there any other solution that works with v2.3?



Thanks for the post. You can create a Web.Release.config; if we find a Release.config, we run it no matter what the environment is. That’s about the only option.


Thanks for the answer.

The Web.Release.config is really not an option, because it would be used in every environment therefore making it useless for environment specific settings.

I will then just duplicate every configuration transform file in my project and try to keep both copies identical at all times.

Another option; in the “Additional transforms” section you can use a binding like:


Then, at the project level, declare the TransformName variable as Dev, scoped to the environments Dev1 and Dev2, and give it different values for other environments.



That seems to be the feature I was looking for. I will try that. Thank you for this suggestion.