Home > source control > Introducing Jenkins CI to my github projects

Introducing Jenkins CI to my github projects

On sunday morning I had an idea of introducing continuous integration (CI) tool for my projects to have one place to see how they are going.

Currently I’m forced to use CruiseControl at work, but I don’t like it much. I was looking for some more user friendly tool. From my teammates working on Java stuff I heard about Hudson. After searching a while, I found Jenkins. It’s fork of Hudson after Oracle claimed the right to Hudson’s trademark (you can read more about it at this wiki page).

It took me about 3 hours to download, install and configure Jenkins. It also includes preparing one of my current projects to run all test cases and builds configurations from command line. I thing it’s pretty easy and takes really small effort.

Now I have automatic builds with test cases execution after each change on my remote github repository. The project you see on the picture is iPhone application, but because I used GHUnit that is able to write tests results in JUnit xml format, I also can see results from all tests.

It’s just the beginning. I’ll try to find other useful features there.

  1. June 1, 2011 at 17:37

    Could you elaborate on how you trigger your test cases when your github repository changes? I tried following these instructions (http://www.foraker.com/hudson-github-hooks/), but it isn’t working so far.

    • June 1, 2011 at 21:31

      I installed two plug-ins: Git Plugin and Github plugin. Then I specified my project’s github url under “Source Code Management”. Another setting was under “Build Triggers”. I marked “Poll SCM” and specified time period (similar to cron settings): “*/5 * * * *”.

      These settings allow Jenkins to check every 5 minutes if anything has been modified on my remote Github repository. If it detects chagnes, the build together with test cases are started.

      If you want to know how to trigger build when commit is made to remote repository (using github hooks) then I cannot help you, because I didn’t do this that way.

  2. June 1, 2011 at 21:50

    Thanks! For some reason I was under the impression that “Poll SCM” would check a local copy of the repository for changes. I didn’t know it would pull from github before checking for changes.

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: