Visual Deployment with Jenkins Deploy Dashboard Plugin
This article introduces the Jenkins Deploy Dashboard plugin, explains how it visualizes deployment versions across environments, and provides step‑by‑step instructions with code examples for adding deployments, creating dashboard views, and adding deployment buttons to streamline CI/CD workflows.
Jenkins Deploy Dashboard is a plugin that provides a visual overview of which application versions are deployed to which environments, helping teams answer questions about current deployments.
The plugin adds a custom view on the Jenkins dashboard where each job’s deployment status is displayed, and users can click an environment to see its release history.
To add a new version to the dashboard, call the addDeployToDashboard method with the environment name and version parameters from any Jenkins job, as shown in the example pipeline code:
properties([parameters([
string(name: 'version', description: 'App version to deploy'),
choice(
name: 'env',
choices: ['dev', 'prod'],
description: 'Environment where the app should be deployed'
)
])])
node {
//...
stage("Deploy") {
// Deploy app version ${params.version} to ${params.env} env
//add release information to the dashboard
addDeployToDashboard(
env: params.env,
buildNumber: params.version
)
}
}Creating the dashboard view involves using the “+” tab on the Jenkins home page, selecting “Deploy View”, naming the view, and optionally using a regular expression (e.g., .*) to include jobs.
The plugin also allows adding deployment buttons to the build sidebar via the buildAddUrl method, enabling quick manual deployments to dev or prod environments, as illustrated below:
node {
stage("Build") {
String builtVersion = "v2.7.5"
// Build app with ${builtVersion} version
//Add buttons to the left sidebar
buildAddUrl(title: 'Deploy to DEV', url: "/job/app-deploy/parambuild/?env=dev&version=${builtVersion}")
buildAddUrl(title: 'Deploy to PROD', url: "/job/app-deploy/parambuild/?env=prod&version=${builtVersion}")
}
}A declarative pipeline example demonstrates how to define parameters for environment and version, and invoke addDeployToDashboard within a script step to record deployment information:
pipeline {
agent any
parameters {
choice choices: ['dev','prod'], description: '', name: 'env'
string defaultValue: '', description: '', name: 'version', trim: false
}
stages {
stage('Hello') {
steps {
script {
addDeployToDashboard(
env: params.env,
buildNumber: params.version
)
}
}
}
}
}These features help DevOps and quality‑check teams quickly see deployment status, trigger deployments, and maintain a clear audit trail of releases across environments.
DevOps Cloud Academy
Exploring industry DevOps practices and technical expertise.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
