Currently, we are seeing longer and longer deployment times, when deploying our web app, using Azure DevOps. When we have a fresh deployment slot, our deployment goes through without issues, but over time, the webdeploy step, takes longer and longer (starting from 3 mins in a fresh slot, to more than 3 hours in older slot).
Background
We do "clean" deployments, i.e. our deployment artifact is a vanilla Sitecore CD/CM package with our code on top. The "Deploy Azure App Service" task has these settings:
- Web Deploy
- Take App Ofline
- Remove additional files at destination
- Exclude files from the App_Data folder
- Rename locked files
- Additional arguments: -useChecksum
This is a screenshot of our current deployment pipeline (for CM):
Possible solutions We are discussing the following solutions:
- manually re-create the deployment slot when the issue arise
- re-create the deployment slot as part of the deployment process
- re-duce the number of files being deployed (i.e. don't deploy a clean Sitecore every time)
I have found blogposts from community members describing different approaches to deployment in general, but I have not found anyone mentioning the issue with deployment time increasing over time.
Does anyone have a working solution that targets this specific problem?