Sameera De Silva
Sameera De Silva

Reputation: 1980

How to set the Jenkins build job status as as the Default Subject of email using Email Extension

I am using https://plugins.jenkins.io/email-ext/ using below code I managed to send code changes in subject body .

Changes:

${CHANGES, showPaths=true, format="%a: %r %p \n--\"%m\"", pathFormat="\n\t- %p"}

Now my requirement is to pass the build job status as pass or failed in the default subject itself . Can I do it without using a pipeline? enter image description here

Subject enter image description here

Upvotes: 1

Views: 1272

Answers (1)

Sameera De Silva
Sameera De Silva

Reputation: 1980

Based on anwer of mainframer Jenkins - Email-ext plugin display name of job in email

I was able to solve this . To add bit of a clarity.

Default Subject- [${BUILD_STATUS}]${JOB_NAME} Build #${BUILD_NUMBER}

To see more more built-in environments. http://your-jenkins-host/env-vars.html/ Example- http://100.10.10.10:8080/env-vars.html/

enter image description here

Upvotes: 1

Related Questions