Build Name and Description Setter

Version: 2.1.0Minimum Jenkins requirement: 2.121.3ID: build-name-setter
Installs: 30321
Last released:
Maintainers
Damian Szczepanik
Kohsuke Kawaguchi
Lev Mishin

Build Travis Build status

Popularity

Build name setter plugin for Jenkins

This plugin sets the display name of a build to something other than #1, #2, #3, ... so that you can use an identifier that makes more sense in your context. When you install this plugin, your job configuration page gets additional setting that lets you specify a build name for each new build.

This plugin can be used in two ways:

  • Set build name at the begining and at the end of the build (both by default, it also can be ajusted)

alt tag

  • Set build name between two build steps (as a separate build step)

alt tag

As the result you can obtain something like this:

alt tag

Pipeline

This is how the plugin can be used via pipeline approach. Name and the description can be changed like any other steps. Mind that there are a few conventions which can be used to modify name or description:

pipeline {
    agent any
    stages {
        stage("Initialization") {
            steps {
                // use name of the patchset as the build name
                buildName "${GERRIT_CHANGE_SUBJECT}"
                buildDescription "Executed @ ${NODE_NAME}"
            }
        }
    }
    post {
        failure {
            // in case of failure, we'd like to have simple 'git blame' on build history :)
            currentBuild.displayName = 'This build needs help!!!'
            buildDescription("Committer: ${GERRIT_PATCHSET_UPLOADER_NAME}")
        }
    }
}

Scripting

The power of this plugin is based on Macro Token so take a look what features you can use.

ArchivesGet past versions
Links
Labels