简体   繁体   English

Hudson和CruiseControl对Java项目有什么区别?

[英]What is the difference between Hudson and CruiseControl for Java projects?

I think the title sums it up. 我认为标题总结了它。 I just want to know why one or the other is better for continous integration builds of Java projects from Svn. 我只是想知道为什么一个或另一个对于Svn的Java项目的连续集成构建更好。

I agree with this answer , but wanted to add a few points. 我同意这个答案 ,但想补充几点。

In short, Hudson (update: Jenkins ) is likely the better choice now. 简而言之, Hudson (更新: Jenkins )现在可能是更好的选择。 First and foremost because creating and configuring jobs ("projects" in CC vocabulary) is just so much faster through Hudson's web UI, compared to editing CruiseControl's XML configuration file (which we used to keep in version control just to keep track of it better). 首先是因为创建和配置作业(CC词汇表中的“项目”)比编辑CruiseControl的XML配置文件(我们过去只保留版本控制以便更好地跟踪它),通过Hudson的Web UI 快得多。 The latter is not especially difficult - it simply is slower and more tedious. 后者并不是特别困难 - 它只是更慢,更乏味。

CruiseControl has been great, but as noted in Dan Dyer's aptly-named blog post, Why are you still not using Hudson? CruiseControl一直都很棒,但正如丹·戴尔(Dan Dyer)恰如其分的博客文章所述, 你为什么还没有使用哈德森? , it suffers from being first. ,它首先受到影响。 (Um, like Britain, if you will, later into the industrial revolution, when others started overtaking it with newer technologies.) (嗯,就像英国一样,如果你愿意,后来进入工业革命,当其他人开始用更新的技术超越它时。)

We used CruiseControl heavily and have gradually switched over to Hudson, finally using it exclusively. 我们大量使用了CruiseControl并逐渐切换到Hudson,最后完全使用它。 And even more heavily: in the process we've started using the CI server for many other things than before, because setting up and managing Hudson jobs is so handy. 重要的是:在此过程中,我们开始使用CI服务器进行许多其他事情,因为设置和管理Hudson工作非常方便。 (We now have some 40+ jobs in Hudson: the usual build & test jobs for stable and development branches; jobs related to releasing (building installers etc); jobs that run some (experimental) metrics against the codebase; ones that run (slow) UI or integration tests against a specific database version; and so on.) (我们现在在Hudson有大约40多个工作:稳定和开发分支的常规构建和测试工作;与发布(构建安装程序等)相关的工作;针对代码库运行一些(实验性)指标的工作;运行的工作(缓慢) )针对特定数据库版本的UI或集成测试;等等。)

From this experience I'd argue that even if you have lots of builds, including complicated ones, Hudson is a pretty safe choice because, like CC, you can use it to do anything , basically. 根据这一经验,我认为即使你有很多构建,包括复杂的构建,Hudson也是一个非常安全的选择,因为像CC一样,你可以用它来做任何事情 Just configure your job to run whatever Ant or Maven targets, Unix shell scripts, or Windows .bat scripts, in the order you wish. 只需将您的作业配置为按您希望的顺序运行Ant或Maven目标,Unix shell脚本或Windows .bat脚本。

As for the 3rd party stuff ( mentioned here by Jeffrey Fredrick ) - that is a good point, but my impression is that Hudson is quickly catching up, and that there's already a very large number of plugins available for it. 至于第三方的东西( Jeffrey Fredrick在这里提到 ) - 这是一个很好的观点,但我的印象是Hudson很快就赶上了,而且已经有很多可用插件了。

For me, the two things I can name that I miss about CruiseControl are: 对我来说,我想念的关于CruiseControl的两件事是:

  1. Its warning emails about broken builds were more informative than those of Hudson. 它关于破碎版本的警告电子邮件比Hudson的信息量更多。 In most cases the root cause was evident from CC's nicely formatted HTML mail itself, whereas with Hudson I usually need to follow the link to Hudson web UI, and click around a little to get the details. 在大多数情况下,根本原因很明显来自CC格式良好的HTML邮件本身,而对于Hudson,我通常需要关注Hudson Web UI的链接,然后点击一下以获取详细信息。
  2. The CruiseControl dashboard is better suited, out of the box, as an " information radiator " (shown on a public monitor, or projected on a wall, so that you can always quickly see the status of all projects). CruiseControl仪表板更适合开箱即用,作为“ 信息散热器 ”(显示在公共监视器上,或投影在墙上,以便您可以随时快速查看所有项目的状态)。 With Hudson's front page, we needed some Greasemonkey tricks to get job rows all nicely green/red. 有了Hudson的头版,我们需要一些Greasemonkey技巧来获得所有绿色/红色的工作行。

Minor disclaimer: I haven't been following the CC project closely for the last year or so. 轻微免责声明:过去一年左右,我没有密切关注CC项目。 (But from a quick look , it has not changed in any dramatic way.) (但从快速看 ,它没有任何戏剧性的变化。)

Note (2011-02-03): Hudson has been renamed/forked as Jenkins (by Hudson creator Kohsuke Kawaguchi and others). 注释 (2011-02-03):Hudson已被重命名/分叉Jenkins (由Hudson创建者Kohsuke Kawaguchi和其他人)。 It looks as if Oracle—which controls the Hudson name—will keep " Hudson " around too, but my personal recommendation is to go with Jenkins , no matter what Oracle says. 看起来,控制着Hudson名称的Oracle也将保留“ Hudson ”,但我个人的建议是与Jenkins一起使用,无论Oracle说什么。

As a long time CruiseControl committer and someone who has never used Hudson I'm pretty biased, but my take on it is: 很长一段时间CruiseControl提交者从未使用过Hudson的人我很偏颇,但我对它的看法是:

Hudson is much easier to get up and running (in large part from a nice web interface) and has a very active plugin development community. Hudson更容易启动和运行(很大程度上来自一个漂亮的Web界面),并且有一个非常活跃的插件开发社区。

CruiseControl has support from lots of 3rd party stuff and has the benefit of doing some neat tricks with the xml configuration like plugin preconfiguration and include.projects which lets you version the configuration information with the project. CruiseControl支持来自许多第三方的东西 ,并且可以使用xml配置做一些巧妙的技巧,例如插件预配置和include.projects,它允许您使用项目对配置信息进行版本化。

If you're only going to have a few builds I think Hudson is the clear winner. 如果你只有一些版本,我认为哈德森是明显的赢家。 If you're going to have lots -- and don't mind the xml -- then I think CruiseControl's xml configuration tricks become a real strength. 如果你有很多 - 而且不介意xml - 那么我认为CruiseControl的xml配置技巧成为一种真正的力量。

My last project, we started off on CruiseControl. 我的上一个项目,我们开始使用CruiseControl。 Which rocked. 哪个摇摇欲坠。 Then we moved to Hudson, which rocked even more. 然后我们搬到了哈德森,后者震得更厉害。 The things I liked about Hudson: 关于哈德森我喜欢的事情:

  • The upstream and downstream projects. 上游和下游项目。 So a commit to your data access code will eventually also trigger a build of the presentation layer. 因此,对数据访问代码的提交最终也会触发表示层的构建。

  • Easily use an existing project as the starting point of a new one - so if you are in the habit of creating development branches, then making sure these are under continuous integration is a snap. 轻松使用现有项目作为新项目的起点 - 因此,如果您习惯于创建开发分支,那么确保这些项目处于持续集成中是一件轻而易举的事。

One difference is that Hudson is the product of a single genius intellect—Kohsuke Kawaguchi. 一个区别是哈德森是一个天才智力的产物 - Kohsuke Kawaguchi。 Because of that, it's consistent, coherent, and rock solid. 因此,它是一致的,连贯的,坚如磐石的。 The downside could be some limitation on the rate of progress. 不利方面可能是对进度的限制。 However, Kohsuke is incredibly prolific, so I wouldn't be too worried about that. 然而,Kohsuke是非常多产的,所以我不会太担心。 And, it's extensible, so if there's something Kohsuke doesn't have time for (or doesn't want), you can probably do it yourself. 而且,它是可扩展的,所以如果Kohsuke没有时间(或不想要),你可以自己做。

I looked at both Cruise Control and Hudson but choose Hudson as it was much easier to setup and configure. 我查看了Cruise Control和Hudson,但选择了Hudson,因为它更容易设置和配置。 Hudson seems very widely used these days with regular releases and lots of extensiblity through plugins. Hudson现在似乎被非常广泛地用于定期发布和通过插件的大量可扩展性。 I would highly recommend it. 我会极力推荐它。

Hudson is the more user-friendly alternative in my opinion. 在我看来,Hudson是更方便用户的选择。 It can be set up and maintained completely via the web interface (apart from the initial installation of the webapp, of course). 它可以通过Web界面完全设置和维护(当然,除了初始安装webapp之外)。

The only way this could be said about CruiseControl is if you count the built-in XML file editor. 关于CruiseControl的唯一方法是计算内置的XML文件编辑器。

Still, having used both, I'd still prefer any one over having no automated build. 尽管如此,在使用两者之后,我仍然更喜欢任何一个没有自动构建的人。

I tried Cruise control...Its good...But documents are fragmented. 我试过克鲁斯控制......它很好......但是文件是碎片化的。 Dashboard is confusing. 仪表板令人困惑。 Widget creation is also confusing. 小部件创建也令人困惑。 Never tried hudson. 没试过哈德森。 Will try on weekend. 会周末试试。

I recently setup Jenkins for building Borland BDS 2006 projects making use of Subversion and I am very happy with it. 我最近设置Jenkins用于构建使用Subversion的Borland BDS 2006项目,我对它非常满意。 I never used CruiseControl yet, so I can't compare. 我还没用过CruiseControl,所以我无法比较。 Read my blog post for more information. 阅读我的博客文章了解更多信息。

Continuous integration of Delphi project with Jenkins Delphi项目与Jenkins的持续集成

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM