Question: I'm trying to replace our current build pipeline, currently hacked together using old-school Jenkins jobs, with a new job that uses the Jenkins pipeline plugin, and loads a `Jenkinsfile` from the project repository.

One thing that the legacy job did was set the build description to include the Mercurial hash, username and current version using the [Description setter plugin](https://wiki.jenkins-ci.org/display/JENKINS/Project+Description+Setter+Plugin), so that builds are easy to find.

Is there a way to replicate/emulate this behaviour with the Jenkins pipeline plugin?

Answer: 
The answer from @jjst describes how to set the build description in "scripted pipelines". In declarative pipelines you can do the same, but need to place it inside a `script { }` block. Here a complete working example taken from [comments on a Cloudbees article](https://support.cloudbees.com/hc/en-us/articles/220860347/comments/360000490231):

```
pipeline {
    agent any
    stages {
        stage("1st stage") {
            steps {
                script {
                    currentBuild.displayName = "My custom build name"
                    currentBuild.description = "My custom build description"
                }
            }
        }
    }
}

```
I'm not sure how old it is, but I recently discovered the `buildDescription` plugin that gives you a declarative method to set the build description. 
Once installed, it's as easy as:

```
steps {
  buildDescription 'my build'
}

```

The console will show a step output:
`New run description is 'my build'`