Configure WebDeploy to leave extra files on server

We have setup some sites with 3.0.7 to use WebDeploy. Any folders/files on the server that are not in the package get deleted. Is there a way to configure the project/package or WebDeploy to leave extra files on the server? My understanding is that there are ways to do this with WebDeploy using the SkipExtraFilesOnServer=True property but I"m not sure where to configure that in Octopus Deploy.

The main issue we are trying to solve is in Azure Web Apps, when you create a web job on a site, Azure stores those files in the App_Data directory inside the website root. Since the web job is typically a separate console app from the web site, we don’t include those files in our deployment package for the website. Now with WebDeploy, those web jobs get deleted from the server when we deploy the site. We’re trying to figure out how to stop that from happening.

Thanks!
Jason

Hi Jason,

Thanks for getting in touch. I’ve created a Uservoice request to get this reviewed, as at least one more person has asked for the same.

For 3.1 we’ll be reviewing our approach on Azure deployments, as we felt (and the user’s feedback confirmed) that we got the design wrong. I’m gonna bring your suggestion up to the team now that they are working on the 3.1 changes to see what they think about it.

Thanks,

Dalmiro

In the meantime, please drop by the uservoice link and add some votes to it. A commend explaining your scenario and why you need this will also help making up your case :wink:

Thanks!

Hi Dalmiro,

Is there any update on this or workaround in the current version? This problem makes Octopus Deploy almost unusable for some of our Azure sites since it overwrites our web jobs and other files not contained in the nugget package. We REALLY need a way to deal with this.

Thanks,
Jason

Hi Jason,

We decided to add a setting to turn off the Octodiff, which is what is comparing the “old files” with the “new files” and deleting the differences. We are planning to ship this change on our next release 3.0.22, which would most likely be released tonight.

Thanks

Dalmiro

Dalmiro,

The issue link you gave me talks about “delta compression”. Is that the same thing that we were dealing with here? http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/9117682-support-to-deploy-to-a-sub-directory-within-an-azu .

Thanks,
Jason

Dalmiro,

The change in 3.0.22 talks about delta compression – is that same thing as Octodiff? It didn’t really look like the same thing. Can you give me an update on this please?

Thanks,
Jason

We have replied twice to the thread below with Dalmiro and have not received an answer back. This issue with Octopus Deploy overwriting files is killing us. Azure uses space inside the web root to store files along with our clients that FTP files outside of our nuget package into website directories. We have to have this resolved or else Octopus Deploy will be useless for Azure deployments. This is urgent for us. Can we please get some resolution to this problem?

Jason Hedges
Vice President, Technology
Smooth Fusion, Inc.
Office: (806) 776-0220
jhedges@smoothfusion.commailto:jhedges@smoothfusion.com

From: Jason Hedges
Sent: Friday, September 11, 2015 9:53 AM
To: ‘Dalmiro Grañas’ tender2+ddcc2b2b94@tenderapp.com
Subject: RE: Configure WebDeploy to leave extra files on server [Questions #5196]

Dalmiro,

The change in 3.0.22 talks about delta compression – is that same thing as Octodiff? It didn’t really look like the same thing. Can you give me an update on this please?

Thanks,
Jason

Hi Jason,

Deep apologies for my delay here. I gave you the wrong github issue. This is the correct one where we mention the addition of the variable Octopus.Action.Azure.PreserveAppData which will help you keep the webjobs that are already there during the deployment: https://github.com/OctopusDeploy/Issues/issues/1852

This change was introduced in 3.0.12 so if you download the latest you should be able to use them. In 3.1 we’re gonna have checkboxes for these variables in the Azure deploy step.

Best regards and again apologies for my delay.

Dalmiro

Ok, thanks. And from reading the thread, it looks like Octopus.Action.Azure.RemoveAdditionalFiles will keep other files besides App_Data that are not part of the nuget package? And where do we configure these settings in Octopus Deploy?

Correct, you’re gonna have to set Octopus.Action.Azure.RemoveAdditionalFiles to false and Octopus.Action.Azure.PreserveAppData to true if you want to keep everything.

You need to add these as variables to your project under Projects-> [ProjectName] -> Variables (see attached screenshot)