hsimah
hsimah

Reputation: 1303

Octopus Deploy deploys non-transformed config files

I am currently configuring Octopus Deploy for our team's applications. It's fair straightforward and quite intuitive to set up.

During deployment it correctly performs *.config file transformation. Web.config is processed to use data in Web.Test.config and Web.Release.config as expected during those deployments. However, the other config file remains deployed - on a Test deployment I get Web.Release.config pushed to the Tentacle.

I could write a simple script step in my deployment to remove them, but I was wondering if anyone knows a way to prevent this?

Upvotes: 1

Views: 1101

Answers (2)

E. Staal
E. Staal

Reputation: 557

When we deploy we use the output of a production build. In that output there is only one web.config (msbuild has allready done the transformation). Then, when we deploy to test (or any other environment besides production) we manually do the transformation using https://ctt.codeplex.com/. I think this gives you the best package (less files) and you deploy optimized, production code to all of your environments.

Upvotes: -1

Alex M
Alex M

Reputation: 2548

Octopus deploy by default would only do transformations of files which are directly in the package and deployed to a target environment machines. It does not automatically remove the transforms and you could achieve this via postDeploy.ps1 or use the File System - Clean Configuration Transforms template.

Default transform feature

Upvotes: 2

Related Questions