I have something really weird happening.
I use jenkins scripted pipeline to send an email with email ext plugin and template groovy-html.template. The email is properly sent if the changeset is empty or if the build result is failure, but if the build result is in (SUCCESS, UNSTABLE) and the changeset not empty, i never get the email... I looked into all jenkins logs and did not find any error that could explain this behavior. The issue is also happening with email template jelly html or groovy text.
Any idea why i'm getting this behaviour?
Here is my codesnipped:
emailext(
subject: 'Deployment',
body: '${SCRIPT, template="groovy-html.template"}',
to: '[email protected]')
And here is the complete pipeline.
currentBuild.result = 'FAILURE'
, i get the email, if i leave it commented, i do not. – Maxime Lememailext subject: 'Deployment', body: '${SCRIPT, template="groovy-html.template"}', to: '[email protected]'
– RNoB