Setting the build description for a jenkins job

If you want to set the build description for a Jenkins job, then follow the below steps.

1. Make sure that the “Description Setter Plugin” installed on the Jenkins server.
2. Go to your Jenkins job configuration page.
3. Go to Post-Build Actions section.
4. On the “Set the build description” section, provide the regular expression to look for it and also the regular expression for failed builds.

Refer the below snippet from my Jenkins job.



I have given the regex as “project tag number is (\d*)”. So Jenkins will look for this string in my job console output and retrieve the number and use that value as build description. If in case, the job is failed, then it will use “failed” text as the build description.

My Jenkins job sample console output is as given below,

Project has been built successfully.
project tag number is 20180330
job finished Date: Fri Mar 30 03:22:13 EDT 2018
[description-setter] Description set: 20180323

The build history looks like below,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s