Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Hudson's so Groovy

DZone's Guide to

Hudson's so Groovy

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

Having used Cruise Control for almost 4 years, when I started looking at Hudson last week, I was impressed seeing how easy it was to configure and get it up and running in just a few minutes. It also has several plugins available, and if you don't find one you can quickly write one as well.

Andrew Glover, in the TestEarly Blog, shows us how to use Groovy with Hudson. Hudson has a Groovy plug-in which can execute Groovy Scripts.

To quote from the blog "as a part of a CI project setup, another dependent project’s directories were becoming read-only due to an SCM feature. Consequently, a child project couldn’t write to the filesystem.

This problem was easily solved using Groovy (plus a little Ant)– a triggered build executes a small Groovy script that uses Ant’s chmod task to make target directories read-write enabled. As you can see, the fix requires 2 lines of code (which could, arguably, be reduced to one)"

def ant = new AntBuilder()
ant.chmod(dir:"./ci09_i/ui/rep2/reports/", perm:"ugo+rw", includes:"**/*.*")

You can read the complete story at TestEarly.com

Isn't that cool? However, I am not sure if there is a way to specify Hudson to run the Groovy Script first before executing any build script or vice versa, any ideas?

Here are some useful links for additional reading:

1. TestEarly.com

2. thediscoblog.com

 

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. 

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}