Posts Tagged ‘hudson’

Tools I can not work without

April 12th, 2010

I wanted to share a bit of informations about the tools I use every day and which I could not work well without. Let’s go.

Vim:

I spend most of my time editing text (writing code, sending emails etc, etc) so having an efficient text editor is really important, I started to work with vim a few years ago and feel really cumfortable with it, furthermore I can learn one new feature / keyboard shortcut every day to make my life even easier.

Hudson:

Every time I start working on something new I define a new job in hudson so all my projects are build and unit tested automatically on a regular basis. Coupling hudson and Ant is a piece of cake. I appreciate the feeling of being backed up by a tool that will ring the alarm bell when something is wrong (of course it can do much more :) ).

OpenGrok:

I discovered that only a few weeks ago and can not live without since then, this “wicked fast” source code browser is awesome. Basically you take Lucene + Excuberant Ctags + a fair amounf of java code and then you have it. Installing it on OpenSolaris is a piece of cake and takes around 5 minutes to get a working instance :) If you plan to use it on Mac Os X, get ready to fight a bit, first for installing Tomcat and then you’ll have to patch OpenGrok in order to make it work, but after that, it works just fine. I really appreciate the way of browsing different code repositories using different SCM and different programming languages (like shown below) and to be able to search into one of them easily. Even if you are a grep wizard or an ack addict, using OpenGrok is really an interesting complement.

And you, what are the tools you can not work without ?

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

A quick but working startup item for Hudson for Mac OS X

February 22nd, 2010

Hudson is just a great tool but what really annoys me is having to run java -jar hudson.war all the time.

Since I am lazy and stupid I like having my computer doing the work for me so I created a small plist file to run hudson as a service, here is the content of the file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>Label</key>
 <string>Hudson</string>
 <key>ProgramArguments</key>
 <array>
 <string>/usr/bin/java</string>
 <string>-jar</string>
 <string>/path/to/hudson.war</string>
 </array>
 <key>RunAtLoad</key>
 <true/>
</dict>
</plist>

I saved it in

/Library/LaunchDaemons/hudson.ci.plist

and enabled it with :

sudo launchctl load -w /Library/LaunchDaemons/hudson.ci.plist

Now I have hudson started automatically. No need to have that in mind in the future :)

Note :

This file can be of course enhanced. What I needed was a 5 minutes fix and that file did the trick, if you have any enhancement feel free to propose them :)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Using Hudson in VirtualBox for multi OS testing

February 8th, 2010

For a small project I currently work on I wanted to run my unit test suites on different operating systems.

Since I work on a Mac and wanted to also run tests on Linux, Virtual Box was exactly what I needed.

Preparing the guest

Just create a new virtual machine, for my project I created a CentOS guest. Install CentOS and configure it like you want. Install the guest additions as well, you will have to install quite a few extra packages in order to get these additions working but the install script is verbose enough to tell you what to install.

Preparing the shared folder

In your VM configuration, just create a new shared folder which points to the project you work on, ideally in read-only mode.
You can now mount the shared folder on the guest, like this:

sudo mkdir /mnt/shared/folder

Add the following line in your /etc/fstab

shared-folder-name /mnt/shared/folder vboxsf defaults 0 0

You can now mount the shared folder by simply running:

sudo mount shared-folder-name

Installing Hudson

You should now have a working guest with CentOS. Just install hudson by using the native packages available.

Configuring Hudson

Create and configure a new job like you would normally do for any normal hudson job.

Below is the configuration for my project, please note that I use the mercurial plugin and the clover plugin.

  • Project name : my project
  • SCM : mercurial, repository : /mnt/shared/folder with @hourly build
  • Run the following ant targets : rununittests, runcodingstandardcheck, generatecodecoveragereportclover
  • Publish code coverage report : checked in path ci/codecoverage with file ‘clover’
  • Activate Chuck Norris : yes (what would be a hudson job without the Chuck Norris plugin ^_^)

Here is a screenshot of the result:

By using such a guest VM I am able to test on 2 different systems, Mac OS ( the host ) and Linux ( the guest ). Next step, test on an Open Solaris guest :)

‘Hope that helps :)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)