Visualize Your Deployment Status with Jenkins
Have you ever asked yourself or your colleague “Which version is currently deployed on the development environment?” or “Hey John, did you deploy that fix to production yesterday?” or “Bill, our client experienced a bug two days ago. Do you remember which version was deployed at that time?”.
If questions like this regularly pop up, and you use Jenkins for their CI/CD process, this plugin is definitely for you!
In the world of Agile development, we have to update our software applications very often. Each version should be deployed to numerous environments. Eventually, it becomes a mess when we talk about which version is deployed to which environment. It would be nice to have an overall deployment status in one place, right?
At Namecheap, we use Jenkins for CI\CD processes. So we decided to make sure we could always check every deployment status by writing a Jenkins plugin called Deploy Dashboard.
In this article, I will show you the capabilities of the plugin and how to use it.
Visualizing with Deploy Dashboard
First of all, we wanted to know what code release versions have been deployed to what test and production environments (or devices). To cover this goal we made a custom view that is used as a dashboard.
Moreover, it is possible to look at release history by clicking on a specific environment.
Getting Started: Add a New Release to Dashboard
Let’s assume that you already have a Jenkins job that builds and deploys your application. The only thing you have to do is to call the
addDeployToDashboard method with the environment name and app version parameters.
Create a Dashboard
On the Jenkins main page or folder, click the + tab to start the new view wizard (If you don’t see a +, it’s likely you do not have permission to create a new view).
On the “create new view” page, give your view a name and select the Deployment View type and click ok.
A regular expression can be used to specify the jobs to include in the view. (e.g.: “.*” will select all the jobs in the folder).
Add Deployment Buttons to Your Build
There are cases when you want to keep your CI pipeline separately from CD one. In this case, the Deploy Dashboard Plugin allows you to add additional buttons to the build sidebar. You should just call a `buildAddUrl` method with a title and URL address.
This feature can be extremely useful for the QA team. They will be able to deploy any existing version to their environment just in a few clicks.
I hope this helps to improve your experience with Jenkins! You are welcome to contribute to the project in Github.