Transforming two times using two different configurations on deploy

The solution I’m trying this out on has 4 different configuration transforms since we used the transforms earlier for each environment.

My problem with this is when Octopus is installing the package it is running the transform for more than one transform file, I have release and dev in this situation. It is causing problem since I want the release transform but the dev is the one that gets run last so that is the one I end up with. I have more than those two transform, but those are the only two that get used by octopus for some reason. Part of the log that shows the problem:

2012-04-13 19:39:51 DEBUG Create Transformation Task.
2012-04-13 19:39:51 DEBUG Start tranformation to ‘C:\Octopus\Tentacle\Applications\OPF.KP.Web.1.0.1\Web.config’.
2012-04-13 19:39:51 DEBUG Source file: ‘C:\Octopus\Tentacle\Applications\OPF.KP.Web.1.0.1\Web.config’.
=====>>>2012-04-13 19:39:51 DEBUG Transform file: ‘C:\Octopus\Tentacle\Applications\OPF.KP.Web.1.0.1\Web.Release.config’.
2012-04-13 19:39:51 INFO Executing RemoveAttributes (transform line 18, 18)
2012-04-13 19:39:51 INFO on /configuration/system.web/compilation
2012-04-13 19:39:51 INFO Applying to ‘compilation’ element (no source line info)
2012-04-13 19:39:51 INFO Removed ‘debug’ attribute
2012-04-13 19:39:51 INFO Removed 1 attributes
2012-04-13 19:39:51 INFO Done executing RemoveAttributes
2012-04-13 19:39:51 DEBUG Create Transformation Task.
2012-04-13 19:39:51 DEBUG Start tranformation to ‘C:\Octopus\Tentacle\Applications\OPF.KP.Web.1.0.1\Web.config’.
2012-04-13 19:39:51 DEBUG Source file: ‘C:\Octopus\Tentacle\Applications\OPF.KP.Web.1.0.1\Web.config’.
=====>>>2012-04-13 19:39:51 DEBUG Transform file: ‘C:\Octopus\Tentacle\Applications\OPF.KP.Web.1.0.1\Web.Dev.config’.

Hi Tomas,

If you have the following environments:

  • Dev
  • Staging
  • Prod

And you deploy to, for example, staging, Octopus will run:

  1. Web.Release.config
  2. Web.Staging.config

The Release.config is for transforms that you want to happen in every situation, and Staging.config is just for the staging environment.

Hope that makes sense,

Paul

Oh, that is actually a nice feature :).It would nice with a graph in the documentation explaining all the transformations.

Something like:

web.config --> web..config --> web..config --> and here goes the order of variable configurations.