[英]Delete files from app service as part of Azure DevOps release pipeline
We have an Azure DevOps release pipeline using the deploy azure app service task to deploy an application.我们有一个 Azure DevOps 发布管道,使用部署 azure 应用服务任务来部署应用程序。
We would like to run a task prior to this deploy task to delete all files in the bin folder of the app service.我们想在此部署任务之前运行一个任务,以删除应用服务的 bin 文件夹中的所有文件。
We do not want to delete all files on the target, just the ones in the bind folder.我们不想删除目标上的所有文件,只删除绑定文件夹中的文件。
I can't see any obvious task that will enable me to do this.我看不到任何明显的任务可以让我做到这一点。 Tasks seem to run in the context of the deployment server rather than the app service and so don't enable access to the app service file system.
任务似乎在部署服务器而不是应用服务的上下文中运行,因此无法访问应用服务文件系统。
What's the best way to do it?最好的方法是什么?
If you are looking to avoid unwanted files then in the Azure App Service Deploy task there is an option "Remove additional files at destination" which while not explicitly deleting the bin folder content will ensure there is no residue from previous releases.如果您想避免不需要的文件,那么在 Azure 应用服务部署任务中有一个选项“在目标位置删除其他文件”,虽然没有明确删除 bin 文件夹内容,但可以确保没有以前版本的残留物。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.