整合Jenkins电子邮件通知 [英] Consolidate Jenkins Email Notifications

查看:132
本文介绍了整合Jenkins电子邮件通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Jenkins项目,其中包含3个简单的自由样式作业,每个作业都有自己的构建从属.每个作业都绑定到一个单独的平台:Linux,Mac或Windows.当开发人员提交代码时,Jenkins会在轮询存储库后不久,在每个构建从属上构建项目,然后每个项目都会向开发人员发送电子邮件,说明构建是成功还是失败. 问题:每scm更改会单独发送三封电子邮件,这实际上是在向开发人员的收件箱发送垃圾邮件,尤其是那些喜欢频繁进行小更改的人.因此,他们很可能会完全忽略电子邮件.

I have a Jenkins project consisting of 3 simple free-style jobs, each with their own build slave. Each job is tied to a separate platform: linux, mac, or windows. When a developer commits their code, Jenkins soon after polls the repo, builds the project on each of the build slaves, and each of those projects sends an email to the developer describing whether or not the build failed or succeeded. Problem: Three separate emails per scm change really spams developers' inboxes, especially those belonging to people who like to commit small changes frequently. They are therefore likely to ignore the emails entirely.

问题:是否有办法(通过插件或项目重组)将三则成功/失败电子邮件合并为一封电子邮件?我研究了 Email-ext 插件, MultiJob 插件和 Build a multi-configuration project 选项,但似乎找不到一种更改项目结构的方法,以便仅向开发人员发送一封电子邮件,以描述哪些作业失败或成功.我怀疑您必须将作业合并到一个MultiJob项目中,并在发送之前检查在每个平台上构建的结果,但是我不知道.关于詹金斯的很多事情我还没有弄清楚.

Question: Is there a way (via plug-in or project restructuring) to consolidate the three success/failure emails into one email? I have looked into the Email-ext plugin, the MultiJob plugin and the Build a multi-configuration project option and can't seem to find a way to change the project structure so that only one email is sent to a developer describing which jobs failed or succeeded. I suspect you have to combine the jobs into a single MultiJob project and check results from building on each platform before sending, but I don't know. There's a lot about Jenkins I haven't figured out yet.

大家给我的任何建议将不胜感激.

Any advice you guys can give me would be greatly appreciated.

推荐答案

可编辑电子邮件通知"发布者(来自email-ext)具有一项设置,可以决定如何处理矩阵(多配置)项目.

The "Editable Email Notification" publisher (from email-ext) has a setting to decide how it deals with matrix (multi-configration) projects.

您可以将矩阵项目的触发"配置为仅触发父作业",这将实现您想要的功能.

You can configure the "Trigger for matrix projects" to "Trigger only the parent job", which should achieve what you want.

同样,您也可以将其配置为为每个配置触发"以获取现在的结果,或为父项和每个配置触发".

Likewise you can also configure it to "Trigger for each configuration" to get the result you have now, or "Trigger for parent and each configuration" for both.

这篇关于整合Jenkins电子邮件通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆