将 Hudson 配置为仅在检测到 SVN 中的更改时执行“构建”或“构建后”操作

发布于 2024-07-30 18:31:17 字数 61 浏览 3 评论 0原文

有没有办法将 Hudson 配置为仅在 SVN/CVS 发生更改时执行构建或构建后操作

谢谢

Is there a way to configure Hudson to only execute Build or Post Build actions if there are changes in SVN/CVS

Thank you

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

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

发布评论

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

评论(2

风苍溪 2024-08-06 18:31:17

您可以让 Hudson 轮询 SCM 是否有更改,并且仅在发现更改时才执行操作。

轮询 SCM:配置 Hudson 轮询更改
单片机。

请注意,这将是
CVS 的操作成本高昂,因为每个
民意调查要求 Hudson 扫描
整个工作区并验证它
服务器。 考虑设立一个
“推”触发器以避免这种开销,
如本文档


您还可以向 SCM 提交后挂钩添加一些内容,以触发 Hudson 构建。

触发器远程构建(例如,从
脚本):
如果您愿意,请启用此选项
通过访问触发新的构建
特殊的预定义 URL(方便
脚本)。

此功能的一个典型示例
将触发新的构建
源控制系统的钩子脚本,
当某人刚刚犯下罪行时
更改到存储库,或从
解析源代码管理的脚本
电子邮件通知。

您需要提供
授权令牌的形式
字符串,以便只有那些知道它的人
将能够远程触发这个
项目的构建。

You can have Hudson poll the SCM for changes and only do things if it finds changes.

Poll SCM: Configure Hudson to poll changes in
SCM.

Note that this is going to be an
expensive operation for CVS, as every
polling requires Hudson to scan the
entire workspace and verify it with
the server. Consider setting up a
"push" trigger to avoid this overhead,
as described in this document

You can also add something to your SCM post-commit hooks that will fire off a Hudson build.

Trigger builds remotely (e.g., from
scripts):
Enable this option if you would like
to trigger new builds by accessing a
special predefined URL (convenient for
scripts).

One typical example for this feature
would be to trigger new build from the
source control system's hook script,
when somebody has just committed a
change into the repository, or from a
script that parses your source control
email notifications.

You'll need to provide an
authorization token in the form of a
string so that only those who know it
would be able to remotely trigger this
project's builds.

朕就是辣么酷 2024-08-06 18:31:17

它并不像查看修订号(如其他地方所述)那么简单,除非您的构建是针对整个 subversion 存储库的。 通常,您的项目共享单个 subversion 存储库,并且您正在构建一些子树。 全局修订号没有帮助。

“svn info [url_to_subtree]”将显示上次更改日期。 您可以解析它并确定它是否晚于上次构建日期并触发新的构建。

It is not as simple as looking at the revision number (as stated elsewhere) unless your build is for the entire subversion repository. Typically you have projects sharing a single subversion repository and you are building some sub-tree. The global revision number doesn't help.

'svn info [url_to_subtree]' will show the Last Changed Date. You can parse this and figure out if it is later than your last build date and trigger a new build.

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