如何在 VSTS 中的每次部署之前清理目标 Azure 网站 Windows Server 上的 wwwroot 文件夹 [英] How to clean up wwwroot folder on the target Azure Websites Windows Server before each deployment in VSTS

查看:11
本文介绍了如何在 VSTS 中的每次部署之前清理目标 Azure 网站 Windows Server 上的 wwwroot 文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大约十几次部署之后,由于积极的开发和部署,wwwroot 目录中充满了很多文件.我们正在使用 VSTS 的 Azure App Service Deploy 任务部署到 Azure Websites Windows Server 以进行 ASP.NET Web API 项目,有没有办法清理之前的 wwwroot 目录部署到 Avsts 部署前清理?

After about a dozen deployments, the wwwroot directory is filled with a lot of files due to active development and deployments. We are using VSTS's Azure App Service Deploy task to deploy to Azure Websites Windows Server for a ASP.NET Web API project, is there a way to clean up the wwwroot directory before deploying to the Avsts pre-deployment clean up?

推荐答案

当使用 Azure App Service Deploy 任务时,并且您正在使用 Publish usingWeb Deploy 选项,还有一个附加选项可以Remove Additional Files at Destination.

When using the Azure App Service Deploy task, and you are using the Publish using Web Deploy option, there is an additional option to Remove Additional Files at Destination.

如果您选中此选项,部署过程将删除目标位置上正在部署的包中没有相应文件的所有文件.

If you check this option, the deployment process will remove any files at the destination where there is no corresponding file in the package that is being deployed.

换句话说,它将删除以前部署中不再需要的所有剩余文件.

In other words, it'll remove any left over files from a previous deployment that are no longer required.

这篇关于如何在 VSTS 中的每次部署之前清理目标 Azure 网站 Windows Server 上的 wwwroot 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆