Tuesday, November 9, 2010

Hudson 一定要裝的 10 個 plugin

Hudson 是一個做 build 的工具,提升 code 的 quality 與 code 的除錯效率。除了本身的功能外,還提供 plugin 的 API 讓許多 plugin 可以用

在此舉出最多人用的 10 個 plugin

The Violations plugin

The Violations plugin is a one-stop-shop for code quality metrics. It supports the principal Java code quality tools: checksytle, pmd, cpd, findbugs, and simian, plus a few others.

Use this plugin to keep track of how your code quality metrics are doing over time, or to review various code quality metrics for a particular build. You can even force a build to fail if there are too many violations. If you do this, just be careful not to interrupt the developer flow too much. For example, you might set up a special QA build (run every night or every hour, for example), that will fail if the QA metrics aren't up to scratch.

The only catch is that you have to integrate the code quality metrics (checkstyle, PMD, Findbugs, or whatever) into your builds. If you are creating new build scripts, you should of course be doing this anyway, but it can be more of a challenge for large legacy code bases.


The Clover plugin

Clover is a kick-ass code coverage tool if there ever was one, and the Hudson Clover plugin is an excellent complement to the tool. The Clover plugin is unique: it lets you add code coverage to (most) existing Ant builds without having to change the build file. This is great for legacy projects. It also lets you generate aggregate coverage statistics on multi-module Maven projects.

If you don't have Clover, all is not lost - the Coberturaand Emma plugins do a great job too, though you do have to set up the code quality metrics in your project yourself first.

The Parameterized Trigger plugin

The Parameterized Trigger plugin lets you add parameters to your build jobs that users enter when they kick off a build. This comes in handy for release or deployment automation, for example, where you want to enter the version number or label you want to release or deploy. You can also get your build job pass these parameters on to other parameterized build jobs.

The Sonar plugin

The Sonar plugin makes it trivial to integrate your projects with Sonar. Sonar is a powerful open source code quality metrics reporting tool, which displays code quality metrics for multiple projects in a variety of ways on a web site.

The Sonar Hudson plugin is magic. It lets you integrate your existing Maven projects into Sonar, with no modifications to the projects. It even works for Ant projects, though there is some configuration to do in this case.

The VMware plugin

The VMWare plugin lets you start up a VMWare virtual machine before a build, and shut it down afterwards. This is excellent for functional or web tests on different platforms.

The Amazon EC2 plugin

The Amazon EC2 plugin lets you start up Hudson slaves an EC2 instance on demand, and then shut them down when they are no longer required. Again, this is great for cross-platform tests, but also for load tests, or periods when you need to expand your CI capacity greatly for a short period of time (just before major releases, for example).

The Setenv plugin

The The Setenv plugin lets you set environment variables for a particular build job. These environment variables are available to any sort of build job, be it Freestyle, Maven, Shell, or whatever. Many build scripts use environment variables for a variety of purposes, and this plugin makes it much easier to integrate these projects into Hudson.

Sectioned View plugin

The Sectioned View Plugin lets you break your job views into sections, such as 'Test Results' and 'Job Graphs'.


The Radiator View plugin

The Radiator View Plugin lets you display the build status for your projects in a format that is easy to see from a distance. Set this up on a large LCD screen visible to all.


The Hudson Helper iPhone app

And finally, the Hudson Helper iPhone app. This is a neat little iPhone app that lets you monitor your builds via your iPhone. Don't leave home without it!

No comments: