Over a million developers have joined DZone.

Continuous Integration Ain't What it Used to Be (With Jenkins, It's EASIER)

DZone 's Guide to

Continuous Integration Ain't What it Used to Be (With Jenkins, It's EASIER)

· DevOps Zone ·
Free Resource

In a previous article, entitled, Continuous Integration: How to Avoid 'Integration Hell' , we discussed the general issues and considerations of the continuous integration environment and projects. In this article, we will discuss Jenkins (previously known as Hudson), which is one of the most popular continuous integration (CI) tools, and how you can achieve Continuous Integration using this tool.

The Jenkins tool is an open source Continuous Integration tool which is written in Java, and runs in a servlet container like Apache Tomcat. It can be used to build software written in various languages such as Java, .Net, PHP, C++ etc. This open-source, free software is available under MIT License.

Jenkins features include:

  1. Building/testing software projects continuously - You can create Build Jobs in Jenkins. There are various configuration options available related to building the software, e.g. code repository, build scheduling, executing test scripts, generating reports etc.
  2. Monitoring the execution of repeated jobs -Jenkins monitors and logs the information related to the execution of repeated build jobs. It maintains the build history with time and status information. Users can also see the console log for particular build instance.
  3. SCM Integration, e.g., SVN, Git etc. - Jenkins integrates with wide range of popular SCM tools such as Git, CVS, SVN, Perforce, Mercurial, Team Foundation etc.
  4. RSS/E-mail/IM Integration - There are various options available to notify the team members about successful or failed builds.
  5. JUnit/TestNG test reporting - Test reports can be tabulated, summarized, and displayed with history information. History trends are plotted in a graph.
  6. Distributed builds - It is possible to distribute the load of preparing builds across multiple workstations.
  7. Authorization - Jenkins can be configured to have role-based access for the build jobs. This is helpful for big organizations where the same CI server is used to build multiple projects by different teams.
  8. Plug-in Support - Various plug-ins are available and Jenkins can be integrated with well-known development tools so developers can write plug-ins to suit the unique requirement of the team.

Jenkins supports following tools in different categories:

  1. SCM vendors: Git, CVS, SVN, Perforce, Mercurial, Team Foundation and many more.
  2. Build tools: Ant, Maven, Gradle, MSBuild, NAnt, Rake and many more.
  3. Unit Testing frameworks: JUnit, NUnit, Selenium, CppNCSS, TestNG, Xunit and many more.
  4. Code Coverage tools: Clover, Cobertura, Emma, Serenity, Sonar, NCover and many more.
  5. Code Analysis Tools: Checkstyle, PMD, Dry, Findbugs, Warnings, CCM, Violations and many more.
  6. Security Tools: LDAP, Active Directory, Crowd and many more.
  7. Applications servers: Weblogic, Glassfish, Tomcat, JBoss etc.
  8. Virtual Environment: EC2, Virtual Box, VmWare, JCloud etc. 
  9. Social communication: E-mail, IRC, Jabber, Twitter etc.

To integrate particular tools with Jenkins, you need to install relevant plug-ins from the Plug-in Manager, as part of the configuration. Once the initial set of plug-ins is established, it is also possible to install new plug-ins later as required.

Sample Screenshots:

Figure 1: The Jenkins dashboard shows the list of jobs with various options such as execute job, view console, build health etc.

Figure 2:  From the Plug-in Manager you can find available plug-ins, check updates and see installed plug-ins.

Figure 3:  From here you can create new a Build Job, and provide a meaningful name to the job, based on the project. You can configure the code repository and provide parameters related to other build options.

Figure 4: As part of configuring Build Job, you can also configure the tool to send email notifications to different people to notify them of various events, and link the deployment server to deploy the build after successful completion, as well as other options.

Figure 5: In this view, you can see the console output with information related to the execution of the build, test scripts, deployment etc.

Figure 6: This is a sample email sent from Jenkins to the developer who broke the build, along with information related to the SVN code file updates.

Figure 7: Jenkins shows the Build History with the information such as build status, time of build and console log.

Other Jenkins Plug-Ins

There are over 150 plug-ins in this tool, including:

  • Artifact Uploaders
  • Build Notifiers
  • Build Reports
  • Build Tools
  • Build Triggers
  • Build Wrappers
  • Cluster Management

Other Popular Continuous Integration (CI) Tools

Open Source:

  • Apache Continuum - Continuous integration server supporting Apache Maven and Apache Ant
  • CruiseControl - Java based framework
  • Tinderbox - Mozilla-based product


  • Bamboo - by Atlassian Software Systems
  • TeamCity - by JetBrains
  • Team Foundation - Server by Microsoft
  • Rational Team Concert by - IBM

Jenkins and other Continuous Integration (CI) can be used to automate the process of code integration, making the build and release management easier, faster and more reliable. These tools make the development process smooth, reduce code errors, increase the productivity of the developers and optimize the deployment and delivery of the software solution .

Hasan Sunasara: Who loves to design, develop and tune Java EnterpriseApplications. I strive to learn new things and improve on every possible areas touched by on the path of life. When not working on Java, I socialize, read blogs and watch movies.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}