Base config file?

Our scenario…
We have one Visual Studio project (console app) which gets deployed to two different folders on the same server. The only difference is in a few lines of the config. We have created two different Octopus packages, and two different config transform files. When deploying, the PreDeploy.ps1 renames the appropriate transform file to the correct name for the environment. Our question is, is there a way to use a base transform file, so that we don’t have the redundancy between the transforms in the two files? Or, is it possible to apply additional transforms via the PostDeploy.ps1? I know this is a weird question and outside of what Octopus is supposed to do.

Thanks,
Rob

Hi Rob,

You can have:

  • Web.Release.config
  • Web.<Environment>.config

Web.release.config will be run first if found, and then Web.<Environment>.Config will be run. Web.release.config could effectively be your base transform file.

Paul

That would run the Release file in EVERY environment, right? I’m looking for two folders in the same environment having different configs. It’s really weird, I know.

Hi Rob,

Thanks for the reply. Hmm, I’m not sure I understand. Could you give me some examples of the different files and how you plan to reuse them?

Paul


From: Rob Gibbens
Sent: 25/09/2012 22:58
To: Paul Stovell
Subject: Re: Base config file? [Questions #267]