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

The single app analytics solutions to take your web and mobile apps to the next level.  Try today!  Brought to you in partnership with CA Technologies

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

 

CA App Experience Analytics, a whole new level of visibility. Learn more. Brought to you in partnership with CA Technologies.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}