简体   繁体   English

作为 Azure DevOps 发布管道的一部分,从应用服务中删除文件

[英]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.

相关问题 Azure Devops发布管道-未更新Azure App Service文件 - Azure Devops Release Pipeline - Azure App Service files not updated 从Azure DevOps发布管道中获取文件 - Grab files from Azure DevOps Release Pipeline Azure Devops Release Pipeline - 将单个文件部署到Azure App Service - Azure Devops Release Pipeline - Deploy single file to Azure App Service 等待新部署的应用服务在 Azure Devops 发布管道中重新启动 - Waiting for a freshly deployed app service to be restarted in Azure Devops Release pipeline Azure DevOps 发布管道消除了应用服务部署槽 - Azure DevOps Release Pipeline wipes out App Service Deployment Slot 从 Azure DevOps 发布管道成功部署后,应用服务不加载 Web 应用 - App Service does not load web-app after successful deployment from Azure DevOps release pipeline Azure DevOps 发布管道 - Azure Devops Release Pipeline 更新 web.config,为 Azure 应用服务的 Azure DevOps 发布管道中的特定环境添加重写规则 - Update web.config to add rewrite rules for specific environments in Azure DevOps release pipeline for an Azure App Service Azure devops-Release Pipeline没有针对运行时堆栈的PHP 7.2的选项,但Azure App服务支持 - Azure devops - Release Pipeline has no option for PHP 7.2 for Runtime Stack, but the Azure App service does 应用服务计划无法在 azure devops 中的发布管道期间覆盖应用设置中的嵌套 JSON 键 - App Service Plan Unable to override nested JSON keys in app settings during release pipeline in azure devops
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM