MeJ
MeJ

Reputation: 1108

Jenkins - Email-ext plugin display name of job in email

Is there an easy way to include the display name of the job in the email subject?

Maybe there is an environment variable for this?

I know it should be possible because the default functionality (email notification) in jenkins already provides this information in the email subject.

Upvotes: 2

Views: 2348

Answers (2)

MeJ
MeJ

Reputation: 1108

The correct environemnt variable which I was looking for is

$BUILD_DISPLAY_NAME

The display name of the current build, which is something like "#153" by default.

Thanks at @maniframer to provide the link for getting more built-in environments.

Upvotes: 4

mainframer
mainframer

Reputation: 22069

Yes, You can use the built-in environment JOB_NAME, other available environments you can use are like BUILD_STATUS, BUILD_NUMBER, etc.

[${BUILD_STATUS}]${JOB_NAME} Build #${BUILD_NUMBER}

enter image description here

As always, you can go to http://your-jenkins-host/env-vars.html/ to get more built-in environments.

Upvotes: 5

Related Questions