在 VSTS 构建和发布中排除/跳过文件 [英] Exclude/Skip files in VSTS Build and release

查看:25
本文介绍了在 VSTS 构建和发布中排除/跳过文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在为 VSTS CI/CD 创建架构,以将我们的 Web 应用程序部署到我们的 Azure 应用程序服务.我们希望在将 web.config 部署到 Azure 服务器时排除它,因为我们是在不同的环境中直接修改 web.config.CI 任务如下所示:

We are in process of creating architecture for VSTS CI/CD to deploy our web app to our Azure App Services. We want to exclude the web.config while deploying it to the Azure server as we are directly modifying the web.config on the different environment. CI Tasks looks like this: CI Taks

CD Task: Deploy Azure App Service I am aware of other ways of updating the web.config https://docs.microsoft.com/en-us/vsts/build-release/tasks/transforms-variable-substitution, but in our case we want to skip the web.config file. I couldn’t find the option to skip file in during release in VSTS as mentioned in this thread How do I exclude the .cs files within an artifact from a vs-team-services CI build? Is there a way to exclude certain files while building and deploying the release?

解决方案

Added -skip:objectName=filePath,absolutePath=web.config in additional arguments. This skips updating the web.config file during deployment.

这篇关于在 VSTS 构建和发布中排除/跳过文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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