azure - 在 Azure Web APP 部署任务中排除删除文件夹

标签 azure azure-devops azure-web-app-service

我在同一个 Azure Web APP(Windows 计划)中有两个应用程序(前端和后端)。

后端应用程序位于wwwroot\back文件夹下

前端应用程序位于wwwroot文件夹下

当我在 Azure DevOps 下使用 azure web 应用程序部署任务部署前端时,后端文件夹将被覆盖。另外,部署后端时也是如此

有什么想法,在部署前端之前排除相同的文件夹吗?

最佳答案

Any idea , to do a exclude of same folder before deploy the front ?

在Azure Web APP部署任务中,没有这样的选项可以满足您的要求。

您可以尝试使用Azure App Service deploy task .

在 Azure 应用服务部署任务中,您可以启用选择部署方法选项并输入-skip参数

enter image description here

例如:

-skip:Directory=\\back 

或者

-skip:skipAction=Delete,objectName=dirPath,absolutePath=wwwroot\\back

-skip:skipAction=Update,objectName=dirPath,absolutePath=wwwroot\\back 

然后目标文件夹将跳过修改内容的选项。

更详细的信息,您可以引用此票证:Azure Pipelines: Exclude folders using Azure App Service Deploy和这个博客:Demystifying MSDeploy skip rules .

关于azure - 在 Azure Web APP 部署任务中排除删除文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66452584/

相关文章:

azure - 使用 Microsoft Graph token 对应用服务后端进行身份验证?

azure - 此请求的授权已被拒绝 - Azure Active Directory - 有哪些日志可用?

azure - 参数 'StandardEncoderPreset.codecs' 不能为 None

azure - 通过 ARM 将 Key Vault 访问策略添加到现有 Key Vault

azure - Azure Devops 和 Azure Blob 存储之间的问题(复制和删除)

git - -split ' ' 在 Powershell 中本地工作在 Azure 管道 Powershell 任务中不起作用

azure - New-AzWebApp 选择 .NET Core 的堆栈设置

azure - Azure 应用服务中的流文件丢失字节

没有运行时的 Azure 服务总线传入请求

asp.net-mvc-3 - 使用Azure ACS时如何解决 "Key not valid for use in specified state"错误?