问题
I want to know how we can specify the pool of users who will receive the mail if the build fails.
For example :- If there are 10 users who are part of the changes in a particular build, but I want to send e-mails only to those whom I have specified and configured to receive mails. Rest will not receive the mails
Suppose I want to send mails only to A, B, C. Even if build fails because of User D, I don't want to send mail to D.
Basically, I am asking if there is a way we can constrain the list of users who can receive the mail?
Is it possible to do?
Thanks
回答1:
Yes there is. In the post-build actions:
- add E-mail Notification
- in the recipients list, add all the email address you want to
- UNCHECK Send separate e-mails to individuals who broke the build
This will send the emails only to those whose email address you have provided, regardless of who broke the build. However, this will not send the emails to the build breakers.
Your other option is to go to the People section, select the users you don't want receiving emails, and remove their email address from their individual profiles. This way they won't get an email even if they broke the build. Only those users whose email addresses are configured will get emails.
回答2:
Have a look at Email ext Plugin which has scores of options to configure who the recipients should be and for what action. Once you install the plugin, you get a new post-build action Extended Email Notification
来源:https://stackoverflow.com/questions/14777618/how-constrain-the-list-of-users-who-can-receive-the-e-mail-in-jenkins-on-build-f