I am using teamcity’s “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:
Octo pack actually doesn’t have an exclude option, so what you would want to do is move the items you do want to package into a folder, then run the package step on that folder and push that.
Hi @jeremy.miller Thank you for the response, Let me further clarify my issue
So basically what I do is, I push my package from visual studio to Bitbucket. Then teamcity pull that package and build it and push it to octopus where I deploy that package. So can you please refer me how to move my items to a different folder without web.config file, and it has to be automated. Is there any way to do that?
Basic Idea: Visual Studio -> Bitbucket -> Teamcity (Build and Push to octopus) -> Octopus
My Build steps are follows,
@jeremy.miller Thank you so much for the help, Using post-deployment script seems kind of easy but not convenient enough. But for now, I decided to stick with that method. Anyway, Thank a lot for the support and really appreciate it.
A post-deploy script to delete the files will also definitely work. The only overhead there is having to remember to do it on every deploy of that package (which may only be once).
If you do end up wanting to implement this into your build steps and want a hand, please feel free to reach out to us.