简体   繁体   English

如何在Jenkins中为依赖项目配置电子邮件通知

[英]How to configure email notification for dependent projects in Jenkins

I have two maven projects, on different Git repositories: core, webapp. 我在不同的Git存储库上有两个Maven项目:core,webapp。 Each have a job in Jenkins which pulls the git SCM and runs Maven build. 每个人都在詹金斯(Jenkins)中有一份工作,该工作拉动git SCM并运行Maven构建。

If someone committed bad code to webapp, then Jenkins will send him an email that the build failed. 如果有人向Webapp提交了错误的代码,则Jenkins将向他发送一封电子邮件,告知构建失败。 Same goes for core. 核心也是如此。

The problematic scenario 有问题的情况

John commits bad code to core, but it doesn't break core unit tests / compilation, but breaks webapp compilation. John向核心提交了错误的代码,但它没有破坏核心单元测试/编译,但破坏了Webapp编译。 In this case, Jenkins does not sends an email, since no commit was made in webapp. 在这种情况下,詹金斯发送电子邮件,因为没有提交Web应用程序中作出。 Webapp job was being triggered since core was changed and it triggered its build. 由于更改了核心并触发了其构建,因此已触发了Webapp作业。 Jenkins output was: 詹金斯的输出是:

An attempt to send an e-mail to empty list of recipients, ignored.

How do I configure jenkins to pull the list of committers in the jobs that triggered this job being built and send them the email as well that the build failed? 如何配置jenkins在触发该作业生成的作业中提取提交者列表,并向他们发送电子邮件以及生成失败的电子邮件?

Use the Blame Upstream Committers Plugin - 使用Blame上游提交者插件 -
the page there describes how to use fingerprints to identify the committers. 那里的页面描述了如何使用指纹来识别提交者。

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

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