Grails Plugin For Hudson Thursday, June 19, 2008

I am pleased to announce that we have worked up a Grails plugin for Hudson. Hudson is a really slick continuous integration server. Check out their site for more info on the engine itself.

It has always been possible to build Grails apps from Hudson but in the past this has involved writing shell scripts that are triggered by Hudson. This works but is not the slickest solution. What you really want is for the CI server to have knowledge of the fact that the project you are building is a Grails app and that knowledge will allow the tool to be more efficient about carrying out the build and also allow the CI server to provide Grails specific options for the build. This is where the new Grails plugin is heading.

Right now the plugin is very basic. In the system configuration screen you may configure as many Grails installations as you like. This is useful for situations where the same CI server may be building multiple projects with different version of Grails or maybe even building multiple copies of the same project with multiple versions of Grails. Below is a screenshot of the system configuration screen:



Notice that there is built in validation to make sure you have entered a valid path to your Grails installation.

When configuring a project in Hudson you have a lot of options for what should happen at build time. The Grails plugin adds a "Build With Grails" option and if that option is selected you can select from a list of common build targets to execute as well as type in any arbitrary targets you may want to execute. This is useful for executing Grails commands that are not in the list of checkboxes and for executing your own custom Grail scripts that may be part of your project. Below is a screenshot of the project configuration screen:



The first version of the plugin has not been released yet but will be soon. In the meantime, I would be happy to hear what kinds of capabilities you would like to see the plugin provide. Even in its current very basic state, the plugin is very useful as it makes configuring a Grails project in Hudson drop dead simple.

11 comments:

Siddharth said...

Jeff,

Its really exciting to hear about the Grails plugin for Hudson. Could you share the feature list for your first release?

Siddharth

Mike Hugo said...

Hey Jeff - this is fantastic! Can't wait for the plugin.

I assume the plugin will fail the build if a Grails script exits with an error code? That's one of the problems we've had with our shell script setup - it's hard to wire it up so that the build stops when, for example, the tests fail.

The only other thing we're doing for some builds is passing system properties, for example -Dgrails.work.dir=... That would be helpful as well.

Look forward to giving the plugin a shot once you release it!

Jeff Brown said...

Yes, I think being able to specify grails.work.dir and other system properties is a good idea. I will get that in the first release. I will add a specific field for grails.work.dir and a few other common system properties and then provide a field where you can type in any arbitrary system properties.

If there are system properties that you commonly set in your build, let me know and I will consider adding them to the list of properties included in the config UI.

iamsteveholmes said...

Hey Jeff!
Fantastic! I'm using hudson and have 6 different grails jobs. grails.work.dir is a MUST in order to have multiple jobs running concurrently.

Any ETA on this? This will be great for our clients (grails project using Hudson).

-Steve

Rich Lawrence said...

This looks excellent.
I'm currently using Grails with hudson via Ant. I have modified the build.xml to include a 'hudson' target which depends on the 'war, test, cobertura and deploy' targets.

Jeff Black said...

This is fantastic idea and I look forward to the first release. I would like to be able to
"clean upgrade test-app run-webtest" and fail the build on test failures.

As secondary ideas, I would want the test report availble and the war available from the latest build as a publish artifact (if the war target is run).

Are you considering hosting the code as part of the hudson project?

Anonymous said...

Is there any update on when this plugin will be released?

Brock Heinz said...

Hey there Jeff,

Have you seen any issues with the plugin and Hudson restarts? I seem to lose all of my Grails configurations when my containers bounces. I've posed the same question to the Grails lists too.

Thanks,
Brock

Anonymous said...

This sounds like a very useful plugin. Any estimates for when it will be available?

Luis Alberto Arias said...

awesome !! I just built it and installed it and its working great (I just hope codehaus.org goes back up soon cause I can't fetch the plugins I need from svn)

Anonymous said...

酒店打工 酒店兼職
台北酒店 打工兼差 酒店工作
酒店經紀 禮服店
酒店兼差 酒店上班 酒店PT 酒店酒店喝酒 酒店消費 喝花酒 粉味