Order of Precendence

I’ve been working through in my head the best way to handle configuration files. Web.configs (and others) obviously change at a different pace than builds and I don’t necessarily want to create a new build (with a new transform) for the overall software. As such I’d like to separate them to an extent from the code and inject them in at the times they need to happen. It could be that Octopus isn’t the best way to handle this, but if it’s not I still have to work whatever I come up with into the process.

One of the things I tried (and maybe it was a syntax issue), was to copy the config file in, in a predeploy script step (in the GUI rather than a powershell included in the package). I’m using a custom installation directory in this case (but wouldn’t always).

Is there a way to consistently reference a deploy step (say naming it the same every time) and the location that it will be installed to?

And if I wanted to pull in something from GIT (or some other version of Version Control) in a previous step, what is the best way to reference that?


Thanks for getting in touch! I think what you will be looking for will be found in this blog post:

It allows you to get variables, such as install locations, package locations or really any variables used by previous steps.
I think this will allow you to complete the processes you describe below.

Please let me know if you have any further questions.

Yep! At first glance that does look like what I need. Thanks!