| I encountered this same issue with Jenkins 2.19.2, and email-ext 2.52. I did some further experiments, and my results contradict some of the previous comments. I am running email-ext as described in Sending Notifications in Pipeline. As part of my experiments, I used all the recipient providers I know:
def recipients = [[$class: 'CulpritsRecipientProvider'],
[$class: 'UpstreamComitterRecipientProvider'],
[$class: 'RequesterRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'FailingTestSuspectsRecipientProvider'],
[$class: 'FirstFailingBuildSuspectsRecipientProvider']]
I tried two scenarios. Push without modification I started with a branch into which I had purposely introduced a failure. I created a new branch, and pushed it without modification:
git checkout -b notifybuild4
git push --set-upstream origin notifybuild4
Jenkins built this new branch and failed as expected, but no email was sent, because the providers yielded no recipients:
An attempt to send an e-mail to empty list of recipients, ignored.
Building branch notifybuild4 a second time resulted in an email being sent. Push with modification Starting with branch notifybuild4 (which fails as described above), I created a new branch, made an immaterial change and and pushed it:
git checkout -b notifybuild5
atom Jenkinsfile # Add an empty line
git add Jenkinsfile
git commit
git push --set-upstream origin notifybuild5
Once again, Jenkins' build of this new branch failed as expected, but no email was sent, because the providers yielded no recipients according to the console output from email-ext:
An attempt to send an e-mail to empty list of recipients, ignored.
Building branch notifybuild5 a second time resulted in an email being sent. |