具有多个触发器的 Hudson 项目
我正在与 Hudson 构建一个持续集成系统,并将一个项目分为两部分。第一个是主要的构建和单元测试元素,我想以传统 CI 方式运行,由 SVN 触发。第二个是功能测试,需要很长时间才能运行,所以我希望它们能连夜运行。
有没有办法设置具有多个触发器的 Hudson 项目,即当且仅当主项目已更改并成功构建时,每晚都会运行功能测试。
我看到过这个问题:Hudson - 不同触发器的不同构建目标,但无论主项目的状态如何,它都会每天晚上运行。
I am building a continuous integration system with Hudson, and have a project split into two parts. The first is the main build and unit test element, which I want to run in the traditional CI fashion, triggered off SVN. The second is the functional tests, which take a long time to run, and so I want them to run overnight.
Is there any way of setting up a Hudson project with multiple triggers, i.e. so the functional tests run each night if and only if the main project has changed and has built successfully.
I've seen this question: Hudson - different build targets for different triggers, but that simply runs each night regardless of the state of the main project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到的情况与您完全相同:带有与 SVN 相关的一些快速健全性测试的构建,但每晚回归测试需要更长的时间。
我们的解决方案是使用 DOS 构建触发器插件。在该构建触发器上,我们附加了一个每晚触发一次的时间表。触发脚本是一系列简单的命令,如下所示:
它从上次成功构建中获取特定文件 (fingerprint.txt),并将其(通过 fc)与我们存储在工作区中的副本进行比较。如果它们匹配 - 则不会发生构建。如果它们不同,我们通过设置 CAUSE 变量来通过 DOS 构建触发器触发构建,然后将新文件存储在触发器的工作区中。
I have exactly the same situation that you do: a build with some quick sanity tests tied to SVN, but a nightly regression test that takes longer.
Our solution was to use the DOS Build Trigger Plugin. On that build trigger, we attach a schedule that triggers once a night. The Trigger Script is a series of simple commands like this:
This gets a particular file (fingerprint.txt) from the last successful build and compares it (via fc) to a copy we've stored in the workspace. If they match - no build occurs. If they're different, we trigger a build via the DOS Build Trigger by setting the CAUSE variable, then store the new file in the trigger's workspace.