A list of pragmatic plugins for pupils and pros alike.
In bygone times, Praqma composed a list of useful Jenkins plugins to spice up your CI life with. However 2013 is ancient history and we’ve decided that our list is long overdue for a refreshing rewrite.
Now we present to you an updated list of handy plugins fixing problems you didn’t even realize you had.
Overview
Server plugins
Server monitoring
Plugins: Disk Usage, Monitoring
Keeping a watchful eye on your server lets you avoid some sticky situations. Why not employ some plugins to provide basic monitoring of your master and slaves? Use the Disk Usage plugin to keep your disk space in check and the Monitoring plugin to oversee a whole slew of interesting metrics in its very own monitoring page.
Nested views
Plugin: Nested View
Organizing your jobs into separate views helps keep your Jenkins organized. Larger Jenkins instances, however, are quickly overwhelmed with dozens of views. Sadly, vanilla Jenkins doesn’t allow for grouping of views, but that’s where the Nested View plugin comes in. It allows you to group relevant views together under a parent view, creating comfortably traversed view trees.
Restarting safely
Plugin: SafeRestart
Jenkins needs to restart every now and then, oftentimes when installing or updating plugins. This plugin allows you to put new jobs on hold and reboot the server once your running jobs are finished. The reboot can be scheduled from both the Jenkins configuration page and the main dashboard.
Green balls
Plugin: Green Balls
Jenkins uses blue balls to mark successful builds for a reason. However, enough people prefer green balls for this plugin, which changes the ball color, to be one of the most popular plugins out there.
Pipeline plugins
Build pipelines
Plugin: Build Pipeline
The Build Pipeline plugin visualizes your up- and downstream connected jobs in a prettified view and helps you get a nice overview of your build process, start to finish. It also comes with the handy ability to add manual triggers to your jobs. This allows you to fit external processes, such as a review before deployment, into your pipeline.
Build badges and promotions
Plugins: Promoted Builds, Build Trigger Badge
Promote your builds as they go and decorate them with informative badges. The Build Trigger Badge plugin decorates your builds with a small badge depicting the build cause. Was it triggered manually, by an SCM change, or did it come from upstream?
Use the Promoted Builds plugin to take it one step further, promoting and decorating your builds throughout your entire pipeline. With every passing step, you can decorate your build with a badge depicting its success. Just a glance at a build will tell you what originally started it and how well it performed further down the pipeline. For the creative users out there, it’s possible to trigger jobs when certain promotion levels are met.
Building a better dashboard
Plugins: Build Monitor, Dashboard View, Radiator View
Piece together your dream dashboard and display the status of your key jobs on that big monitor by the coffee machine. Sip your coffee with pride as you bask in its green glow (or scurry back to your desk to fix that last commit instead). Gather and display interesting statistics about your builds on a different dashboard, letting you to identify fragile parts of your build process and pinpoint its ills.
Job plugins
Jobs as code
Plugin: Job DSL
Storing your job and pipeline configuration as code comes with a myriad of advantages. It allows you to version control your configuration, regenerate your jobs on the fly, spin up and configure new Jenkins instances in a heartbeat, etc. The Jenkins Job DSL is a popular and exceptionally well documented Groovy DSL for configuring pipelines and jobs via scripts. Sinking your teeth into this one will doubtlessly open up some new doors.
Job scripting and parameterization
Plugins: EnvInject, Environment Script
Reduce redundancy and increase reusability of your jobs by parameterizing their variable values. Use the EnvInject and Environment Script plugin to help you inject necessary values into your jobs. They’re surprisingly flexible and can really help you construct generic jobs. As an added bonus, once your jobs are parameterized, it will be trivial to convert them to clean scripts using Job DSL.
Analysis, Analysis, Analysis
A good build pipeline records a vast assortment of interesting metrics regarding your code (and an even better pipeline sets warnings and thresholds on them). Below are a few plugins to help you analyze and point out frailties in your code.
Compiler warnings
Plugin: Warnings
Keep track of compiler warnings thrown in your builds, they’re a great indicator of potential problems in the code. Don’t panic if your first build returns hundreds of issues, trends are more important than absolute values. You can steadily bring those numbers down with diligence and you’ll rest easy knowing the code gets a little better with every commit.
Test results and coverage
Plugins: xunit, junit, nunit, Test Results Analyzer
Round up the results of your tests and plot them in helpful graphs and statistics. (You do have tests, don’t you?) Identify fragile tests and invest some time to fortify them (or the code they’re testing). Keep an eye on your test coverage trend, challenge yourself to increase that percentage with every commit.
Task scanning
Plugin: Task Scanner
Remember that //TODO
you left last friday? Or that @deprecated
method you still need to replace throughout the code? We know you’ll go back to fix them eventually, but don’t let them pile up too high, use the Task Scanner plugin to keep them in check. It comes with a bunch of handy features like trend reports, prioritization and thresholds.
Job configuration history
Plugin: JobConfigHistory
Useful for keeping track of what changes you (or that bozo Jim across the room) have made to your Jenkins jobs. The plugin stores a copy of a job’s configuration whenever it is changed, allowing for change tracking, diffing and painless configuration restoration.
Wrap-up
Hungry for more Jenkins customization? Dig around in the list of available plugins under the Jenkins plugin manager. Search and ye shall find!
Did we miss an awesome plugin? Perhaps even an up-and-coming plugin you’ve been working on? Let us know! We’d love to try it out. If we like it, it might even end up on the list!
Published: Jan 18, 2016
Updated: Mar 26, 2024