we have configured Jenkins - Editable Email Notification Templates for sending customized email after every build.
What we did:
- Added script under
*Jenkins -> Manage Jenkins -> Editable Email Notification Templates-> Add New Template*
and then under"Default Content"
section, we added default groovy scripts (for example: groovy-html.template - Copy paste content). Save. - Now under project job, under Post-build section we selected same template
- But when we receive emails, then email is coming without replacing environment variables.. like
" /> BUILD ${build.result} URL ${rooturl}${build.url} Project: ${project.name} Date: ${it.timestampString} Duration: ${build.durationString} Cause: ${cause.shortDescription}
Problem: Environment variable like "build.result", "build.url" etc are coming as variable name (instead of actual values). Are we missing something here?