How to Configure and Use Jenkins - A Continuous Integration System

Jenkins (http://jenkins-ci.org/) is a Continuous Integration system, facilitates continuous build and test setup for projects. It is an open source tool is similar to 'CruiseControl'. Jenkins is quite stable tool and is used by many Organizations. In this article, we shall discuss about Jenkins, its usage, and configuration.

When we call it 'Continuous Integration System', what is this?

When we work in a team environment using some Source Control / versioning tool, we checkout the work code from repository and starts working on it. After this, every developer used to commit her code to repository whenever she is finished with her work. When application is highly integrated, every commit may change the application integration scenarios, break the integration and probably can induce bugs also, or can break the code compilation etc. Now we need some tool to ensure that we check this inter-dependencies of integration and the stability of latest committed code, as soon as any body commits the code. So we need some tool, which can perform following kind of tasks:
  1. As soon as, any code is committed to source code repository (or at any given schedule), tool takes the update from repository for the project and run its build
  2. Frequency to check any new commit in source code repository should be configurable
  3. Build system is designed by team and can be based on any building mechanism like ant or maven. Tool should recognize and support the famous build tools like ant or maven etc
  4. Tool builds the project and hence all tasks configured with build system will be performed
  5. If build fails, tool should capture the 'build logs'/'console output' and should be able to send email with all logs to more than one configured email id
  6. It should have some User Interface where user can be able to see the status of various projects, their last build time, failure, logs etc
  7. If build passes, it means everything is good with new commit
  8. Then tool should be able to check if any other project or module is dependent on current project. If yes, it should trigger the build for that project also
  9. Again controls goes to step 5 for new dependent project
  10. .....
For more information about 'Continuous Integration', please refer to
  • http://en.wikipedia.org/wiki/Continuous_integration
  • http://martinfowler.com/articles/continuousIntegration.html

Jenkins support all of above features and even more with different extensions.

Earlier 'Jenkins' was known as 'Hudson'. It was started by its founder (as Hudson) developer while working with Sun Microsystem. Later, it was separated out under a separate name as 'Jenkins' due to some IP (or similar) rights conflicts. Hudson is moved to Eclipse Foundation now. You can find it at http://hudson-ci.org/

After knowing this, one question come to mind is, which tool we should use? Well, this is something everyone need to find herself. However, we have decided to go for 'Jenkins' because it is where most of the original developers and community is working. It is having quite active development releases and is going well as of now. You can find more discussions at http://stackoverflow.com/questions/4973981/how-to-choose-between-hudson-and-jenkins