Jenkins Plugins

Submitted by Barnaby Golden on Tue, 17/06/2014 - 08:53

Jenkins is an excellent choice for continuous integration as it has numerous plugins available, is well supported and is open source.

The following is a list of some of the most useful plugins and how they can be used.

 

GIT Plugin

The out-of-the-box installation of Jenkins comes with CVS and Subversion plugins, but surprisingly no Git plugin. The GIT Plugin does the job fine and has a simple configuration.

If you are using public Github repositories then the configuration consists primariliy of the repository URL. If you are using a private Github repository or other repo that is locked down then you will also need to configure authentication. The simplest authentication is http/https URL based but leaves your password in plain sight. The GIT Plugin does support storing username/password credentials and this is a more secure approach.

But the most secure approach is to use public/private keys and configure the user that runs Jenkins with the necessary key for accessing your repository.

Note that you will need a local installation of Git to make this plugin work. Luckily on Linux this is often as simple as a one-line package install.

 

Static Analysis Utilities

Several of the Jenkins static analysis plugins are built around the Static Analysis Utilities. If you want to use plugins like Checkstyle and PMD then you will need to install the Static Analysis Utilities plugin first.

 

Static Analysis Collector Plug-in

Although not strictly necessary, the Static Analysis Collector Plug-in does provide a much improved visual display of the results of static analysis. For example, it allows you to see charts of analysis results over time and to add columns for static analysis results in the Jenkins job views.

 

Checkstyle Plug-in

The Checkstyle plug-in lets you publish your Checkstyle results and mark a build as unstable at a given threshold (although you are usually better off setting this threshold in your Maven configuration).

Note that the Checkstyle plug-in does not run Checkstyle on your code. It simply displays the results of an analysis that has been driven by your build.

 

PMD Plug-in

As with the Checkstyle plugin, the PMD Plug-in publishes the results of PMD analysis.

 

Cobertura

As with the PMD and Checkstyle plugins, the Cobertura plugin allows you to publish the results of your coverage analysis.

Sadly Cobertura is not yet compatible with Java 8 (as of June 2014).

 

FindBugs

Another analysis style plugin that displays the results of FindBugs analsysis.

Note that FindBugs is not yet compatible with Java 8 (as of June 2014).

 

Xvfb plugin

On Linux systems Jenkins is typically run headless (with no GUI interaction). If you want to run browser based tests locally you will need to provide them with an X-windows manager and that is where Xvfb comes in. It emulates the X environment without actually displaying anything.

Note that you will need to install Xvfb on your system as well as install the Xvfb plugin on Jenkins.

 

cucumber-reports

Cucumber is widely used for BDD, but cucumber-jvm has a pretty limited user base. Luckily there are a few Jenkins plugins available that support the publishing of cucumber-jvm reports.

cucumber-reports is probably the most stable of these plugins and provides a nice visual display of your BDD test results.

 

Performance Plugin

The Performance Plugin knows how to read performance test results from JMeter and displays them as a really useful chart.

 

Dashboard View

Dashboard View is another nice-to-have plugin. It lets you build your own dashboard-like views including static analysis charts and tables.

A nice aspect of Dashboard View is that you can look at your analysis results across all your builds and identify trends.

 

Green Balls

For some annoying reason Jenkins shows working builds as blue rather than green. This is distracting and sometimes confusing and I recommend the Green Balls plugin to ensure that the more approapriate colour scheme is used.


 

Target Audience

© Copyright 2018 bhgagile Limited

Paperblog

Software Development Blogs - BlogCatalog Blog Directory