指导“构建”通过开发、构建和部署过程

发布于 2024-12-14 10:15:33 字数 814 浏览 0 评论 0原文

使用 TFS 时遇到的问题

——特别是 Team Build——我正在尝试提出一种构建和部署多个 Web 应用程序的策略。我正在努力定义我想要如何准确地执行这些构建和部署。

在这种情况下,我将构建定义为编译任何应用程序时创建的内容。我将部署定义为实际发布到某个环境的内容,即使该环境是内部的。

TFS 提供了一种创建构建的方法。生成的构建的质量可以由适当的用户设置。构建可能具有“准备测试”、“通过 QA”、“通过 UAT”、“失败”、“已发布”等质量。

可能性

我曾参与过在 TFS 中设置与部署相对应的构建定义的项目。例如,PC 将具有 Builds ReleaseQA、ReleaseUAT 和 ReleaseProd。虽然这确实有效并且已集成到 TFS 中,但对我来说感觉像是作弊;我们不是创建一个构建并将其引导到一个环境中,而是创建许多构建并将每个构建部署到不同的环境。

我设想了一个通过生成构建然后通过各种环境推广该构建来工作的过程。

太棒了

右键单击​​ TFS 中特定的已完成构建,然后选择“部署”->“UAT”。

不太棒

位于我的构建机器上的脚本文件夹,其标题包括部署构建qa、部署构建uat和部署构建产品;一个人用一个内部版本号来调用它们,然后脚本将该构建部署到适当的环境中。

是否有一种集成良好的方法来执行我提出的“很棒的场景”之类的事情,或者我是否坚持做一些不太棒的事情?如果没有任何“开箱即用”的东西,我愿意接受附加组件或应用程序。

Problem

Using TFS--specifically Team Build--I am trying to come up with a strategy for building and deploying several web applications. I'm struggling with defining how exactly I want to perform those builds and deployments.

In this case, I define builds as what one creates when one compiles any application. I define a deployment as what one actually releases to some environment, even if that environment is internal.

TFS provides one with a way to create a Build. The generated Build's quality may be set by appropriate users. A Build may have a quality of Ready for Testing, Passed in QA, Passed in UAT, Failed, Released, etc.

Possibilities

I have worked on projects that have build definitions set up in TFS that correspond to deployments. So, for example, a PC will have the Builds ReleaseQA, ReleaseUAT, and ReleaseProd. Although this definitely works and is integrated into TFS, it feels like cheating to me; rather than creating one build and shepherding it through one's environments, one is creating many builds and deploying each to a different environment.

I envision a process that works by generating a Build and then promoting that Build through the various environments.

Awesome

Right-click a particular completed build in TFS and pick Deploy->UAT.

Less Awesome

A folder of scripts sitting on my build machine with titles like deploy-build-qa, deploy-build-uat, and deploy-build-prod; one calls them with a build number and the script deploys that build to the appropriate environment

You

Is there a well integrated way to do something like the Awesome scenario I propose or am I stuck with something less awesome? If there isn't anything "out of the box", I am open to add-ons or applications.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

澜川若宁 2024-12-21 10:15:33

是的,这是可能的!我今天一直在为我正在开发的新项目的基础设施实现它:)

我开始使用 TfsDeployer。

首先,我创建了一个使用 MSDeploy 的 powershell 脚本(我们正在构建一个包含多个 Web 和 WCF 的解决方案)项目),然后将脚本链接到 TfsDeployer。

现在,我可以更改构建的质量并启动 powershell 脚本,将构建部署到测试、验收或生产服务器。

我也非常喜欢帮助所有配置转换的是 SlowCheetah。它有助于定义所有 xml 文件的转换以及简单预览转换的能力。

希望这有帮助:)

Yes this is possible! I've been implementing it today for the infrastructure of a new project I'm working on :)

I came to use TfsDeployer.

First I crated a powershell script that uses MSDeploy (we're building a solution with multiple Web and WCF projects) and then link the scripts to TfsDeployer.

Now I can change the quality of a build and kick of a powershell script that will deploy the build to a test, acceptance or production server.

Something I also really liked for helping with all the config transformations is SlowCheetah. It helps with defining transformations for all xml files and the ability to simply preview the transformation.

Hope this helps :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文