Hudson 如何同时处理多个签到?

发布于 2024-10-19 18:41:47 字数 200 浏览 0 评论 0原文

我真的很喜欢 Hudson,但我没有找到一种方法来处理快速连续的签到。这个想法是,每次签入都会进行冒烟测试,如果更改编号 1234 的回归在签入 1235 和 1236 之前没有完成,那么应该如何处理?是否由外部脚本来跟踪已运行的变更列表,或者 Hudson 是否为您跟踪此情况?我试图查看文档以了解如何处理此问题,但我找不到任何内容。

如果我的问题需要澄清,请告诉我。

I really like Hudson but I do not see a way to handle a quick succession of checkins. The idea is that every checkin gets a smoke test run against and if change number 1234's regression does not finish before checkin 1235 and 1236 how is that supposed to be handled? Is up to an external script to keep track of which changelists have been run or does Hudson keep track of this for you? I tried to look through the documentation to see how this is handled but I couldn't find anything.

Let me know if my question needs clarification.

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

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

发布评论

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

评论(2

∞琼窗梦回ˉ 2024-10-26 18:41:47

您可以创建参数化构建(例如SMOKE_TEST),它将修订号作为输入参数(例如REVISION_NUMBER)。当然,签出应作为构建步骤之一(而不是触发器)来实现:

构建步骤:

  1. 签出基于所需的修订
    关于构建参数
    REVISION_NUMBER
  2. 运行冒烟测试

然后实施另一个作业(例如 REVISION_CONTROLLER),该作业将监视源控制存储库的新修订。一旦发现新版本,作业就会使用 SMOKE_TEST 作业的 Hudson HTTP URL 启动 SMOKE_TEST 实例,并以新版本作为参数,例如: http://server/job/SMOKE_TEST/buildWithParameters?REVISION_NUMBER=...

SMOKE_TEST 的所有实例都将被放入队列中,因此如果 1234 未完成,1235 将等待。如果您想重新运行它,您还有机会启动自定义修订的冒烟测试。

You can create parameterized build (e.g. SMOKE_TEST) that will take revision number as input parameter (e.g. REVISION_NUMBER). Of course, checkout should be implemented as one of the build steps (not as trigger):

BUILD STEPS:

  1. Check out needed revision based
    on the build parameter
    REVISION_NUMBER
  2. Run smoke test

Then implement another job (e.g. REVISION_CONTROLLER) that will monitor source control repository for new revisions. As soon as new revision is found the job starts SMOKE_TEST instance with new revision as a parameter using Hudson HTTP URL of SMOKE_TEST job like: http://server/job/SMOKE_TEST/buildWithParameters?REVISION_NUMBER=...

All instances of the SMOKE_TEST will be put in the queue and thus if 1234 is not finished, 1235 will wait for that. Also you have a chance to start a smoke test for custom revision in case you want to rerun it.

热情消退 2024-10-26 18:41:47

实用的方法:

  • 使第一个作业尽可能短,如果必须的话,让它在之后触发一个更长的作业(例如,考虑在 Maven 中编译和安装目标)
  • 如果快速作业需要 2 分钟,让它轮询 SCM每 2 分钟

这不能保证每次提交都会编译(“冒烟”),但会关闭。 Hudson/Jenkins 会为您跟踪更改 - 请参阅作业页面上的“更改”菜单项以及每个构建页面上的“更改”菜单项。

A practical approach:

  • Make a first job as short as possible, and let it trigger a longer job afterwards if you must (f.ex. consider goals compile vs install in Maven)
  • If the quick job takes 2 minutes, let it poll the SCM every 2 minutes

This won't guarantee a compilation ("smoke") for every commit, but close. And Hudson/ Jenkins keeps track of changes for you - see the "Changes" menu item on the job page, and the "Changes" menu item on each build page.

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