使用提交后挂钩触发 Cruise Control.net 构建

发布于 2024-07-24 05:02:42 字数 201 浏览 4 评论 0原文

我正在寻找一种从颠覆后提交挂钩触发 Cruise Control.net 构建的方法。

我希望这样可以在提交后直接启动构建。 我知道执行此操作的正常方法(轮询服务器),但当可以使用钩子完成时,似乎没有必要继续轮询服务器。

一种想法是调用仪表板的“强制构建”功能,但这将触发构建,即使所有修改都在主干路径树之外,因此没有进行任何需要构建的修改。

I'm looking for a way to trigger a Cruise Control.net build from a subversion post-commit hook.

I want this to in order start the build directly after an commit.
I know about the normal way of doing this (polling the server) but it seems unnecessary to keep polling the server when it can be done using a hook.

One thought would be to invoke the "Force Build" functionality of the dashboard but this will trigger a build even if all modifications is outside of the trunk path tree and therefore no modification have been made which warrant a build.

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

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

发布评论

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

评论(3

晒暮凉 2024-07-31 05:02:42

过滤更改的问题正是 CC.NET 使用轮询机制的原因。 (事实上​​,在某些情况下,可能需要在构建中包含多个开发人员的新更改。)

“强制构建”功能是我能想到的实现此目的的唯一机制,但是如果您只想要从主干进行更改,这需要您的提交后挂钩执行相当于通过某些适当的过滤器设置进行管道传送的 svn 日志(可能是详细日志),然后仅在需要时触发“强制构建”。

The problem with filtering changes is exactly why CC.NET uses the polling mechanism. (That, and the fact that there may be some scenarios where it is desirable to include new changes from multiple developers in the build.)

The "Force build" functionality is the only mechanism I can think of to accomplish this, however if you only wanted changes from the trunk that would require your post-commit hook to perform the equivalent of an svn log (possibly a verbose log) piped through some appropriate filter setting, then trigger the "force build" only if needed.

ペ泪落弦音 2024-07-31 05:02:42

您使用“强制构建”的想法可能会奏效。

我不明白您对主干路径树之外的修改的担忧?
您不能在提交后挂钩中检查这一点,并且仅在修改的文件位于 /trunk 下时才强制构建

您是否考虑过这样做的缺点?

您有 2 个变更集。
您提交变更集 1,构建开始,您提交变更集 2,并且必须等待构建/测试完成,然后另一个构建才开始构建/测试变更集 2。

Your idea of using the "Force Build" will probably work.

I don't understand your concern about modifications outside of the trunk path tree though?
Can't you check for this in the post-commit hook and only force a build if the modified file is under /trunk

Have you considered the downside to doing this?

You have 2 changesets.
You commit changeset 1, build starts, you commit changeset2 and have to wait for your build / test to complete before another build starts to build / test changeset 2.

没企图 2024-07-31 05:02:42

我建议不要这样做,但如果你真的想这样做,我会从 URL 触发器

URL 触发器监视任何 URL 的更改,因此您只需让提交后挂钩更新 html 文件即可。 或者,如果您使用的是 viewvc,您可以让它监视以下 url:

http://servername/viewvc/repos?view=rev&revision=HEAD

该 URL 将在每次提交到 SVN 后更新

I would recommend against doing this, but if you REALLY want to, I'd start with a URL trigger.

The URL trigger monitors any URL for changes, so you could just have your post commit hook update an html file. Alternatively, if you are using viewvc, you could have it monitor the following url:

http://servername/viewvc/repos?view=rev&revision=HEAD

That URL will get updated after every commit to SVN

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