Imagine a bacon-wrapped Ferrari. Still not better than our free technical reports.
See all our reports

Top 10 Jenkins Must-Have Features/Plugins

While planning my trip to San Francisco for JavaOne (catch me there for a beer), I saw that there is a Jenkins User Conference coming up October 2nd, 2011, just prior to JavaOne. As I was signing up for the event, I started thinking that we’ve been using Hudson/Jenkins for years now. Through the years, certain Jenkins features/plugins have really paid off and been life savers for getting higher-quality software out quicker. So I thought, why not share this with you? Here is a list of my own and the team’s top 10 must-have Jenkins features/plugins.

Easy Installation

Jenkins comes as a WAR file (there are also a wide variety of Linux packages available and a Windows installer) that you can drop into your favourite JEE container (Tomcat, Jetty, Glassfish etc.) or you can start the WAR file directly with java -jar jenkins.war. That’s it! Now that it is up and running, you can start configuring jobs and installing plugins. It will use a folder in your $HOME to persist the configuration and store the actual jobs. No database, no special installation, no special registration. Clean and easy.

What if you no longer had to redeploy your Java code to see changes? The choice is yours. In just a few clicks you can Say Goodbye to Java Redeploys forever.

Easy Upgrades

Jenkins has very quick release cycles, and statistics shows that there is a release for every 6.59 days. The release process page will state that an RC freeze is schedules for Monday, and then late Friday the RC is released. Also, there is a Long-term Support version available that is put together every 3 months and is suitable for more stable installations.

The upgrade process itself is super easy. It does not matter if you are using Linux, Mac OS or Windows; there is a single, easy way for upgrades built into the product itself.

Scriptability

Jenkins provides different means to communicate with it. There is a web-based GUI that everyone is accustomed to, the command line interface and also a Rest API for Python, XML and JSON. You can feel that this is a tool from developers for developers. For example, to iterate through all jobs available in a Jenkins installation, all you need in Python is 3 lines of code.

import urllib
 
obj = eval(urllib.urlopen("http://ci.jenkins-ci.org/api/python").read());
for job in obj['jobs']:
   print job['name']

To generate a graph relationship of all your jobs in your installation, you don’t need much more code (mind the configurability and usability sections).

View Filters

Once you get a large number of jobs in your installation (we have about 200 defined), you will want to organize them so that the right people can get a quick grasp of the current status of the builds in which they are interested. This is where the little plus sign (+) comes to work. You are able to construct views for your branches, projects and persons that will list only a subset of your jobs. The subset can be defined either by a regular expression or explicit project selection.

Amazon EC2

One of the little-mentioned features, which I think is totally taken for granted in Jenkins, is its ability to scale out to a large number of nodes and distribute the workload between them. If your own infrastructure is not large enough, then this plugin lets you tap into the resources of the Amazon EC2 infrastructure. You can specify the AMIs to use, label them, provide connection credentials and test the connectivity.

We use EC2 to run our JEE container tests. This means that to test WebSphere 7.0.1 we launch the specific AMI and start up WebSphere with our agent (LiveRebel or JRebel) and go through the test suite. This is orchestrated by Jenkins using this plugin and then copying back the results.

Maven 2 Project

This plugin allows you to download the internets and take advantage of Maven’s features. Jenkins reads your project’s dependencies from your POM and, if those are also built on Jenkins, sets up triggers in such a way that a new build in one of those dependencies will automatically start a new build in this project. Jenkins understands all kinds of dependencies in POM, namely:

  • parent POM
  • <dependencies> section of your project
  • <extensions> section of your project
  • <reporting> section of your project

This process takes versions into account, so you can have multiple versions/branches in your project on the same Jenkins instance and it will correctly determine dependencies. Of course, there are over 20 plugins listed under the Maven section of the Jenkins Plugins Page.

HTML Publisher

This plugin is handy with built-in copy to master functionality. Imagine that you have some files generated through your builds that are not actual artifacts. Let’s say logs, debug info, obfuscation maps whatnot. This plugin lets you to copy them to a master and provide an easy HTML file that will have links to these special files of yours for really quick access.

Copy Artifact

If you are not using a dependency management system, your build jobs become isolated as they do not know anything about each other. This plugin helps to solve this problem by allowing you to copy needed files from one job to another. So it may be handy to copy a resulting artifact from one build job into another job that will run tests against it. It does sound a bit hackish, but it is way better than referencing your artifacts from one job folder to another.

Jenkins Throttle Concurrent Builds

I am pretty sure that you have some jobs running in Jenkins that should not interfere with each other. This plugin allows you to group jobs, and allow only some defined number of jobs run concurrently (in most cases, it is one) in the same environment. Take test jobs that use some container instances preinstalled on your master/slaves, for example: this plugin allows you to configure your jobs so that they will run on different slaves or wait for another job to finish before starting.

Join

This plugin allows a job to be run after all the immediate downstream jobs have completed. In this way, the execution can branch out and perform many steps in parallel, and then run a final aggregation step just once after all the parallel work is finished. This plugin is useful for creating a diamond shape project dependency. This means there is a single parent job that starts several downstream jobs. Once those jobs are finished, a single aggregation job runs. Unfortunately, more complex interactions are not possible with this plugin.

Your time is too valuable to sit around waiting for your code to redeploy. Seriously, imagine how much more you could accomplish if you choose to Eliminate Redeploys from your daily routine!

Green Balls

Historically Jenkins has used the blue color to denote successful builds. So, all status messages throughout the GUI use blue as the color of success. I don’t know the history of this, but closest thing that comes to mind is the The Matrix, where the blue pill was designated as the safe choice. If you are like me and feel that green is the way to go (Green Hornet, Green Lantern, Gumby, traffic lights, etc) then you can change your preference to green with the Green Balls plugin.

Conclusions

This was our list, a list that is suitable to deliver Java-based software that needs to be tested on a large matrix of Java versions, vendors and JEE containers. The whole list is not universal but the 4 features mentioned in the beginning will always stand out. I’d really like to know which other plugins are awesome – what are your favorite plugins and why are they useful in your line of software development? Let me know in the comments section below.

  • http://romaintaz.myopenid.com/ romaintaz

    As far as I know, Hudson / Jenkins uses blue balls for successful builds instead of green balls for a simple reason : to be clearly identified by color blindness people !

  • http://www.zeroturnaround.com/ Toomas Römer

    Wow, did not know that. I wonder how it works because Wikipedia ( http://en.wikipedia.org/wiki/Color_blindness ) states that there is red-green and blue-yellow blindness so some combinations won’t work anyways.

  • https://www.google.com/accounts/o8/id?id=AItOawnl1fDfusItc1UPJeDlaUb77AQoD15u5Zc LDM

    I think you answered your own question:

    By default it uses Blue/Red.  Since it is either Red/Green or Blue/yellow, a color blind person would always be able to distinguish between Blue & Red.

  • Jimmynoonan

    The reason for the Blue Balls vs. Green is to accommodate color blind users…

  • AndyB

    The reason for the blue balls is because of the Japanese traffic light system. Even though the physical traffic light is green, they call it the “blue light” and in diagrams etc, it is depicted as blue.

  • http://profiles.google.com/justin.forder Justin Forder

    Red-green colour blindness (in males) is the commonest form. One of the rules of user interface design is that colour should never be the only differentiator – and both the presentations you show break that rule. Using different shapes (e.g. tick vs. cross) as well as different colours would be better.

  • http://www.graycoresoftware.com grayaii

    What about the Chuck Norris plugin?!?! :)
    BTW, the Jenkin’s conference was pretty cool.  Hopefully they’ll have another one next year!

  • Florin Jurcovici

    Hey! You forgot The Mask and the Hulk!

  • DzmitryKashlach

    Thank you for the information, Thomas! Have you tried Jenkins plugin from Blazemeter?
    http://community.blazemeter.com/knowledgebase/articles/102721-blazemeter-plugin-to-jenkins

    It allows to create perfarmance test task as a post-build job.

  • http://www.zeroturnaround.com/ Toomas Römer

    Cool, but have not tried it. I guess this is best if running JMeter tests?

  • Justin Sookikian

    FYI – it comes from the fact that the creator of jenkins is Japanese and in Japan, a blue light signifies success, instead of a green light (This is what he told me)

  • http://www.facebook.com/bart.mensfort Bart Mensfort

    I would like to see my program running.. the GUI is hidden and sometimes crashes. Which add-on can make my GUI visible?

  • DzmitryKashlach

    There is one Jenkins plugin, which can be useful during performance testing phase. It allows to run JMeter scripts from testing cloud after building is finished.

  • Andrei Solntsev

    We use the following Jenkins plugins:
    - Git and Github plugin
    - Gradle plugin (we use Gradle to build some projects)
    - Jenkins Xvfb plugin (to run UI Tests with Chrome/Firefox)

    - and of course, green balls and Chuck Norris..

  • Siddhant

    I want to create a new folder each time my code is checked out from the SVN and append it with a unique ID. Can someone please tell me how to do it?