Visual Deployment with Jenkins Deploy Dashboard Plugin
This article introduces the Jenkins Deploy Dashboard plugin, explains how to visualize deployment status across environments, and provides step‑by‑step instructions with code examples for adding deployments to the dashboard, creating the view, and adding deployment buttons to pipelines.
The Deploy Dashboard plugin for Jenkins (available at https://plugins.jenkins.io/deploy-dashboard/) helps teams track which application versions are deployed to which environments, answering common questions like "Which version is currently in development?" or "Was a patch deployed to production yesterday?".
In agile development, frequent releases make it hard to keep track of deployments; the plugin consolidates deployment status into a single dashboard view.
Visualizing Deployments
The plugin provides a custom view that lists deployed versions per test and production environment, with clickable entries to view release history.
Getting Started: Adding a New Version to the Dashboard
Assuming you have a Jenkins job that builds and deploys your application, call the addDeployToDashboard method with the environment name and application version parameters.
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
On the Jenkins home or folder page, click the "+" tab to start the new view wizard, name the view, select "Deploy View" type, and optionally use a regular expression (e.g., .*) to include jobs.
Adding Deployment Buttons to Your Versions
The plugin also allows adding custom buttons to the build sidebar via the buildAddUrl method, enabling quick deployment of a specific version to chosen environments.
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}")
}
}Declarative Pipeline Example
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 quality‑assurance teams quickly deploy any existing version to the desired environment, improving the overall Jenkins experience.
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.
