使用 TeamCity 构建和部署特定修订版号

发布于 2024-10-01 05:14:40 字数 126 浏览 0 评论 0原文

我刚刚开始掌握 TeamCity 和 MSDeploy,并且部署到由 SVN 提交触发的开发环境运行良好。我的问题是关于发布到测试环境;我想根据特定的修订号按需执行此操作。根据用户定义的修订版配置 TeamCity 构建的最佳方法是什么?

I'm just getting to grips with TeamCity and MSDeploy and have deployment to a dev environment triggered by SVN commit working nicely. The question I have is in terms of releasing to a test environment; I want to do this on demand and based on a specific revision number. What's the best way to configure a TeamCity build based on a user-defined revision?

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

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

发布评论

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

评论(2

牛↙奶布丁 2024-10-08 05:14:47

查看 TeamCity 中的固定功能。您可以固定某个版本,然后部署最新的固定版本。

因此,您在 TeamCity 中有一个“创建开发构建”任务,该任务部署到开发环境并公开工件。您可以在 TeamCity 中创建另一个任务,该任务将使用“创建开发构建”任务中最新固定构建的工件并部署到您的测试环境。

您可以创建另一个任务,将其部署到生产最新固定的“测试”版本。只需取消最后固定的构建即可实现回滚。

您还有部署构建的历史记录。

Take a look on Pin functionality in TeamCity. You can pin a certain build and then deploy latest pinned build.

So you have a 'Create development build' task in TeamCity which deploys to dev environment and exposes artefacts. You can create another task in TeamCity that will use artefacts from latest pinned build in 'Create development build' task and deploy to your testing environment.

You can create yet another task that deploys to production latest pinned 'test' build. Rollback can be achieved by simply unpinning last pinned build.

You also have a history of deployed build.

离旧人 2024-10-08 05:14:46

您可以在 TeamCity 中使用运行自定义构建对话框,并自定义有 Changes to include 参数,您需要在其中指定要构建的实际 SVN 版本。

You can use Run Custom Build Dialog in the TeamCity, and customize there Changes to include parameter, where you need to specify actually SVN revision to build.

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