Hudson NodeJS Plugin

If you’re a NodeJS user who happens to use Hudson as a continuous integration server, then perhaps you would be interested to check out NodeJS Plugin which I released about a month ago (yea, I’m always behind with blogging).

This plugin allows you to use NodeJS script on a build step, as an alternative to the existing shell script (out of the box) and Ruby script (via a plugin).

Call me too optimistic, but I’m waiting for the day when all standard shell script commands have their NodeJS equivalence.

JSGames Plugin – Play Mario Kart & Tetris On Hudson

Now you can play games on Hudson using JSGames Plugin, albeit only a cutdown version of Mario Kart and Tetris (credit goes to Jacob Seidelin of Nihilogic Games). This plugin is extensible enough, so it’s pretty easy to add new games. The winners of 10K Apart would be good additions given the right license.

I wrote this plugin as an experiment on using Hudson for non-continuous integration purposes, in this case, a very minimalistic ‘games delivery platform’. Games as plugins, each with a pluggable Hudson UI that automatically adds a game menu / navigation. To push this further, the dashboard can then be modified to look more like Steam or iTunes, but of course I didn’t do this part.

Hudson is quite flexible, eh?

Hudson BuildMonitor v1.5.5

FIFA World Cup 2010 update: Australia was demolished by Germany 0-4.

After ten months since the last public approval (v1.0.2) and four review rejections from the Mozilla editors, Hudson BuildMonitor v1.5.5 was finally approved a couple of weeks ago.

This version contains a major refactoring effort, attempting to separate the generic JavaScript code from the Firefox specific code. The goal was to make it easier for me to create a Chrome extension version of Hudson BuildMonitor, but of course I never had the time to do it and by now there are already two Chrome extensions out there, Hudson Extension by sanitz and Hudson Monitor by Henning Hoefer.

What I didn’t know back then when I started the refactoring effort was that Mozilla introduced an add-on verification suite about a month after v1.0.2, and that the Mozilla editors started working on reducing global namespace pollution. Those two things were good of course, it’s just that I had to put more sporadic efforts to work on those changes, which then stretched this release even longer.

Some of those changes are:

  • Everything is now namespaced, and I really mean everything. The editors even picked up un-namespaced external libraries, which means Dean Edward’s Base is now name_edwards_dean.Base .
  • setTimeout usage should be replaced by nsITimer.
  • Login details management should use *drumroll* nsILoginManager.
  • Datejs can’t be used anymore because it extends native Date, I replaced it with Matt Kruse’s Date library.

Out of the bug fixes included in the 1.5.x releases, I’m particularly happy with:

  • Finding a workaround for HUDSON-2979, a problem that has been a blocker for OS X users. I bought a MacBook Pro about six months ago and was finally able to investigate this error myself.
  • Fixing the mysterious error with French translation files. It used to work in older versions prior to v1.0.2 because the property files were UTF-8 without byte order mark and they contained non-ASCII characters, then at one point it was accidentally encoded as ISO-8859-1 while still having those non-ASCII characters which then broke the add-on. To avoid this problem from happening again in the future, I decided to take the safer option and unicode-escape those non-ASCII characters.

Working on Hudson BuildMonitor on and off for the past two years (the first release was on 8 June 2008, wow, has it been _that_ long?) has been a good opportunity to revisit JavaScript, a language many developers used to look down at. I agree with Douglas Crockford that JavaScript has been misunderstood, checkout his talk on JavaScript: The Good Parts at Google, and with the emergence of server side JavaScript, I believe this language is going to take off next year.

And to those who are still using Hudson BuildMonitor, thank you.

Hudson Gource

Awesome visualization of Hudson codebase on SVN using Gource, a reply to Kohsuke’s tweet a few days ago. Gource is a software version control visualization tool, similar to code_swarm, but triple the coolness factor.

This video somehow doubled up, I must’ve done something wrong when I added the audio using iMovie. The activities from 2005 to 2010 run up to 16:30 minute mark, the rest is just a repeat so you can skip it.

And for future reference, these are the commands I used on OS X to generate the video:

  • sudo port install gource
  • sudo port install ffmpeg
  • svn log --verbose --xml > hudson-svn.log
  • python --filter-dirs hudson-svn.log > hudson-gource.log
  • gource --highlight-all-users --log-format custom hudson-gource.log -800x450 -s 0.01 --stop-at-end --hide filenames,dirnames --follow-user kohsuke --output-ppm-stream - | ffmpeg -y -b 3000K -r 24 -f image2pipe -vcodec ppm -i - -vcodec mpeg4 hudson-gource.mp4

Nice instrumental songs by Eric A Liniger.

Re Hudson SiteMonitor Plugin And JSLint Violations Support

Just a quick note about a post I made over at Shine Technologies blog re Hudson SiteMonitor Plugin and JSLint Violations support.

My current employer, Shine Technologies, allowed me to spend a couple of days to contribute to an open source project, so naturally I chose Hudson and worked on things that are useful for the projects I’m involved with at work.

SiteMonitor Plugin was a late follow up to this short thread on Hudson users mailing list about a year ago. JSLint support in Violations Plugin was an effort to add JSLint report handling in Hudson a la Checkstyle.

Hudson Code Swarm Part 2

Continuing from my last Hudson Code Swarm post, this code_swarm video covers the last 7-8 months of activities in Hudson SVN repository (r14862 on 29 Jan 2009 to r21601 on 11 Sep 2009).

Hudson project has been very active during that period, and this video clearly reflects that fact with the number of commiters (names) and their activities (particle movements).

Hudson Code Swarm Part 2 from Cliffano Subagio on Vimeo.

And in case anyone is interested, I’ve uploaded the code_swarm config file I used to generate the videos to github.

RFC – ChuckNorris Plugin

Update (06/10/2009): installation & usage instructions are available from ChuckNorris Plugin wiki page.

Me and some colleagues were yammering some Chuck Norris Facts-like jokes a few days ago (ChuckNorrisException can never be caught, only thrown :p), and that reminded me of ChuckNorris Plugin, a simple plugin I wrote when I first started learning about Hudson plugin mechanism a while ago.

This plugin displays a picture of Chuck Norris, instead of Hudson the butler, and a random Chuck Norris ‘The Programmer’ fact on each build page.

On failure build, Chuck Norris is ready to give you a whoopin’ for breaking the build.
You’ll also see a Chuck Norris fact on the build page.

A thumb up on successful build.

And an alert stance on other build results.

Please leave a comment and let me know what you think of ChuckNorris Plugin. And also let me know if you want to install it on your Hudson instance, I’ll make the .hpi file available for download.

My favourite facts: ‘Chuck Norris can unit test an entire application with a single assert,’ and ‘When a bug sees Chuck Norris, it flees screaming in terror, and then immediately self-destructs to avoid being roundhouse-kicked.’

Update (22/12/2010): mission accomplished, ChuckNorris Plugin was mentioned on Java Posse #331 – Roundup ’10 – Modules, at 21:22, Carl suggested the use of ChuckNorris after Tor mentioned FindBugs, Checkstyle, etc.

BuildMonitor v1.0

It’s been a long time since the last one (v0.9.2 – November 2008), but I’ve finally managed to release Hudson Build Monitor v1.0 .  This add-on is still in the sandbox, I’ve been waiting for approval from the Mozilla editors for the last 9 months, so unfortunately you still have to login to download it.

A new feature in this release is build executor monitoring. This feature will work only on Hudson instance feeds (non-job feeds), and you have to enable it via Prefereces window -> Feeds tab -> Enable executor monitoring check box.

The executor status will be displayed next to the build status. It’s blue when one of the executors is running a build, red when one of the executors is stuck, and grey when all executors are idle or offline.

Another new feature is the support for HTTP Basic Authentication, this has been requested by a number of users with password-protected Hudson feeds. You can set the username and password in Preferences windows -> Network tab -> Username and Password fields.

Thanks to Jason Meridth who helped with testing this feature and wrote up his experience.

Other minor changes in this release:

  • ‘Add Link To Hudson Build Monitor’ menu only appears when you’re right clicking Hudson feed links (for all, for failures, for just latest builds), and no longer for all links.
  • Preference window is now tab-ified as seen from the above screenshot.
  • Hudson icon tooltip on Firefox status bar now displays a message that recommends user to add Hudson feed link via right click menu instead of manually adding the URL to Preferences window Feeds section. This feature was already implemented in v0.9 (released in November 2008) and documented on the wiki page, however, there are quite a number of users who are still not aware of it and keep adding the feed URL manually following the old tooltip message.

As usual, translations have been updated thanks to Eric Lefevre-Ardant and Seiji Sogabe. Unfortunately I had to temporarily disable the French translation in v1.0 due to something wrong with the file/text(s) which breaks the add-on. I’ll do a patch release when it’s all sorted out, in the mean time, users with French locale on Firefox will get the default English texts.

Build Executor Monitoring

Here’s a sneak peek of Hudson Build Monitor‘s new feature, the ability to monitor build executors from Firefox statusbar panel. This feature was requested by Espens back in July last year. Espens was one of the earliest users who raised lots of ideas and feature requests. Thanks Espens!

In retrospective, I should’ve implemented this feature much earlier as I found out recently how useful it is to be able to keep track of the currently running builds and the status of the executors. Having a stuck executor is like losing a leg, sometimes you end up with a lot of builds waiting in the queue just because a master/slave doesn’t have any idle executor.

I’ve been monitoring Apache Hudson instance, and that jspf-trunk build has been stuck for the past 3 days. If the master instance is set up following the 1 executor per 1 CPU suggestion, that’s like wasting 1 CPU resource not doing anything (if the box is dedicated for Hudson).

Build executor monitoring will be included in v1.0 release about 2 weeks from now.

Another  good news is that Hudson Build Monitor Firefox Add-on was featured in the tools tips section of JavaTools Community Newsletter on December 29th, 2008. It’s a few months old, but someone just told me about it :p. Thank you!

Hudson Code Swarm

I found a very interesting project called code_swarm, which is (as quoted from its web site) ‘an experiment in organic software visualization’. code_swarm analyses the commit activities within the project’s source repository, and generates a visual representation of those activities. Each resource commit is represented as a particle floating around the commiter’s username.

So I thought it would be interesting to see how Hudson has evolved as a project, check out the embedded video below… . The particles are color coded. Red-shaded particles for Java, Jar, JSP, Jelly. Yellow-shaded particles for XML, properties files. Green-shaded particles for HTML, CSS, JavaScript, and images. Blue-shaded particles for various scripting languages.

Hudson Code Swarm from Cliffano Subagio on Vimeo.

If you have some bandwidth to burn, you should visit the video’s page at, have a look at the bottom right of the page, and download the original video (344.31Mb at 1024×768 resolution). The particles look beautiful in great detail.

I used Hudson SVN log from r1 on 27 Oct 2004 to r14861 on 29 Jan 2009 as the activity data and fed it to code_swarm. You could see from the video that Kohsuke worked on his own until jglick started contributing at r533 on 1 Aug 2006.

There were 60+ contributors when I made my first commit at r10133 on 16 Jun 2008, and now the project has 100+ contributors. Hudson has definitely been gaining momentum in the past year or two on both the developers and users fronts. It would be interesting to see how the project will turn out in the next couple of years. Another Hudson Code Swarm video by Jan 2011?