Hudson Ruby Gem

Today I created my first Ruby gem and published it on Gemcutter: hudson-remote-api.
The source code is available on GitHub:

This gem allows you to interact with Hudson’s remote access api using Ruby. So far the features include triggering builds, disabling jobs, copying jobs, updating job configuration and more.

I have used this set of scripts to automated many tasks with Hudson. Here are some examples of what you can do.

Get a list of all Hudson jobs currently building:


List all Hudson jobs in the build queue:


Get the next build number for a Hudson job:

job ='jobname')

Trigger a build:

job ='jobname')

Create a new Hudson job to build from an SVN branch:

job1 ='jobname')
job2 = job1.copy
job2.repository_url = job2.repository_url.sub("trunk", "branches")
Tagged with: , , , ,
Posted in hudson, ruby

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: