I am using the new Azure Web App target in my project to deploy an application that has multiple parts. We have a Web API (asp.net) project and an angular front end. The angular front end and the rest api are packaged into separate nuget packages and published to the library.
The project its set up to deploy the Web API package first then the Angular UI package to the same Azure Web App target.
There seems to be an issue with the deployment of the second part. When the second package is deployed it appears that is is deleting the contents of the first package. I can ftp into the Web App and can see that the full contents of the second package are present. If I disable the deployment of the second step then I can see that the contents of the first step are present. If I deploy both steps then I only get the contents of the second step.
Am I missing a trick here? How can I set this up so that I can deploy multiple packages to the Azure Web App target?
Thanks for getting in touch! At the moment our WebApp support invokes MSDeploy / WebDeploy but we don’t provide any way to:
- Delete all existing files prior to publish (or leave them all alone)
- Exclude files from the App_Data folder (or include them)
Whenever we deploy to a WebApp we perform an MSDeploy / WebDeploy
sync operation that removes files from the target that don’t exist in the source which is why you’re seeing this behaviour.
We are considering the best approach to handle these kind of situations including WebJobs and multiple deploys into the same WebApp using this GitHub Issue: https://github.com/OctopusDeploy/Issues/issues/1852
In the meantime you could achieve your desired result by building and deploying a single NuGet package. In fact this is exactly what we’re doing with our own projects which also include WebJobs.
Take a look at what Bjorn is doing here: http://community.octopusdeploy.com/t/deploying-webapps-with-webjobs/311
I hope that helps!
Its great that you are working on this https://github.com/OctopusDeploy/Issues/issues/18520
Since my question is referenced on issue will I get a notification when it gets released?
I have taken a look at what Bjorn is doing but it does not work well in our situation as we have different teams working on the different components. We need to keep the packages separate to allow the teams to release at their own pace.
Thanks for getting back to us. That does make sense, having a different release cadence for different teams. In that case once that Issue is closed you should be able to implement exactly the deployment you are wanting.
If you watch the Issue in GitHub you will get notifications from GitHub directly with any comments and status changes.
Hope that helps!
Just thought you’d like to know we’ve shipped the Octopus 3.1 Pre-Release which has better support for different release cadences for Azure Web Site + Web Jobs. Check it out at http://octopusdeploy.com/blog/octopus-deploy-3.1-pre-release