如何在 TeamCity 中重新组合构建?

发布于 2024-09-06 09:12:01 字数 188 浏览 2 评论 0原文

我们有很多测试。我可以将它们分解,以便在初始编译构建发生后它们在单独的代理上运行,但是有没有办法重新组合这些结果?拥有 8 个都需要绿色的构建配置,这使得很难看出您是否拥有一个 ubergreen 构建。

一旦我们将构建拆分出来,TeamCity 中是否有办法重新组合/加入构建? TW-9990 可能会有所帮助 - 允许在依赖项中使用 AND。

We have a lot of tests. I can break these up so that they run on seperate agents after an initial compile build happens, but is there a way I can recombine these results? Having 8 build configurations that all need to be green makes it hard to see if you've got one ubergreen build.

Is there a way in TeamCity to recombine / join builds once we've split them out? TW-9990 might help - allowing ANDs in the dependencies.

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

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

发布评论

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

评论(3

梦年海沫深 2024-09-13 09:12:01

我们找到了在 TeamCity 5 中肯定有效的答案:

  1. 一次编译构建,
  2. N 次测试仅构建采用compile.zip!** 并复制到编译输出通常所在位置的构建。 (通过模板)

  3. 综合完成:

    • 完成构建触发器:等待成功构建:...
    • 快照依赖项:如果有合适的快照,请勿运行新构建
      仅使用合适的成功构建

这一切似乎都运行良好,并且整个 shbang 很容易复制到分支等。我非常高兴 - 这对我们来说已经运行了好几个月了。

We found the answer which certainly works from TeamCity 5:

  1. One compile build,
  2. N test only builds that take compile.zip!** and copy to where the compile output would normally be. (via a template)

  3. Consolidated finish:

    • Finish Build Trigger: Wait for a successful build in: ...
    • Snapshot Dependencies: Do not run new build if there is a suitable one
      Only use successful builds from suitable ones

This all seems to work nicely and the whole shbang is easily copied for branches etc. Am very happy - this has worked well for us for many months now.

知你几分 2024-09-13 09:12:01

不知道如何在本地做到这一点。以下是我关于如何尝试解决此类问题的第一个想法:

  • 将测试结果保存到文件
  • 将测试结果文件发布为构建工件
  • 创建“合并构建”
  • 将工件依赖项添加到各个测试项目中
  • 编写自定义“构建”脚本使用类似 (N)Ant 的东西。这将解析各个测试结果并按照 TC KB

祝你好运!

No idea how to do that natively. Here's my first thoughts on how I would try and tackle such a thing though:

  • Saving test results to files
  • Publishing the test result files as build artifacts
  • Creating a 'Merge build'
  • Adding artifact dependency onto the individual test projects
  • Writing a custom 'build' script using something like (N)Ant. This would parse the individual test results and publish the results as per the TC KB

Good luck!

花开雨落又逢春i 2024-09-13 09:12:01

跳出框框思考,您可能会拥有一个实际上不执行任何操作的整体构建(或使用您的测试构建配置之一作为“主”),并且对每个拆分测试构建都具有快照依赖性。这样,如果其中任何一个失败,“主”将会失败,因为依赖构建失败。

TW-9990 看起来关心的是构建触发而不是依赖关系。

Thinking outside the box you could have an overall build which doesn't really do anything (or use one of your test build configs as your 'master'), with snapshot dependencies on each of your split test builds. That way if any of them fail, the 'master' will fail because one the dependent build failed.

TW-9990 looks to be concerned with build triggering rather than dependencies.

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