简体   繁体   English

如何在Jenkins中向开发人员发送电子邮件通知以进行构建失败

[英]how to send email notification to developer for build failure in Jenkins

I have a continuous integration setup and integrated selenium scripts in jenkins. 我在jenkins中有一个持续的集成设置和集成的硒脚本。 In case of failure in build, mail notifications should be sent to the developer who commited the changes. 如果构建失败,则应将邮件通知发送给提交更改的开发人员。 I run selenium scripts in jenkins to verify the status of the build. 我在jenkins中运行selenium脚本以验证构建状态。 The problem is that if there is any failure, email notifications are sent to the selenium script developer instead of the application developer. 问题是,如果发生任何故障,电子邮件通知将发送到selenium脚本开发人员而不是应用程序开发人员。 It assumes that build is getting failed due to the changes made in selenium script but the actual issue is with the application code. 它假定由于selenium脚本中的更改而导致构建失败,但实际问题出在应用程序代码上。

Is there any way to send mail to application developers for build failure instead of selenium script developer ? 有什么方法可以发送邮件给应用程序开发人员,而不是selenium脚本开发人员吗?

I would have preferred to write this response as comment rather than answer, but due to insufficient rep, am posting it anyways. 我本来希望将此回复写为评论而不是回答,但是由于代表不足,所以无论如何都要张贴它。 If you want to send email notifications to particular email address, check out Email-ext plugin . 如果您想将电子邮件通知发送到特定的电子邮件地址,请查看Email-ext插件 With this you can add post build action of Editable Email Notifications and control which email address you send notifications and when(if your job fails or success) 借助此功能,您可以添加可编辑电子邮件通知的后期制作操作,并控制您发送通知的电子邮件地址以及何时发送(如果您的工作失败或成功)

在此处输入图片说明

First of all, use email-ext plugin as mentioned above. 首先,使用如上所述的email-ext插件。 Secondly, ensure you select 'upstream committers' option. 其次,确保您选择“上游提交者”选项。 As per its own description: "Sends email to the list of users who committed changes in upstream builds that triggered this build." 按照其自己的描述:“发送电子邮件到在触发该构建的上游构建中进行更改的用户列表。” If your application build triggers a selenium build, this is what you need. 如果您的应用程序构建触发了硒构建,这就是您所需要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM