How to exclude web.config file from the pakage that we push to octopus?

Answered

I am using "OctopusDeploy: Push Packages" option to create and push zip file to octopus. I want exclude Web.config, Web.Release.config and Web.Debug.config files. I tried to remove Web.Config using several methods. None of them seems to be working.

P.S: I use "Publish packages as build artifacts: " option.

I need to push All files in NorthwindSolution Except Web.Config as a zip file (it's even better If I can exclude all Web.config, Web.Release.config and Web.Debug.config)

Here are few of the method the method which I tried:

1. NorthwindSolution/** => Release.%MajorVersion%.%MinorVersion%.%build.number%.zip-:NorthwindSolution/Web.config
2. NorthwindSolution/** => Release-:NorthwindSolution/Web.config.%MajorVersion%.%MinorVersion%.%build.number%.zip

3. NorthwindSolution-:NorthwindSolution/Web.config => Release.%MajorVersion%.%MinorVersion%.%build.number%.zip

and few more tried. None worked though.

 

1
1 comment

Hello!

As I can see, the issue has already been discussed with Octopus team: https://help.octopus.com/t/exclude-files-from-teamcity-push-pakage/25928/3
The suggested solution sounds good; apart from a post-deployment script, you could also consider not to push the web.config to BitBucket in the first place (this way, TeamCity would pull the package which is good to use immediately). 

0

Please sign in to leave a comment.