简体   繁体   中英

How to send e-mail to upstream committers if downstream job fails?

We have 2 projects in Jenkins. 1. Project-A 2. Tests

Tests is a downstream job for Project-A. Currently, if some change in Project-A breaks Tests job, there is no e-mail sent to culprits (those who made changes in Project-A).

I want to send a mail to all those upstream committers if my downstream job (Tests module) fails. How can we do it?

Thanks

Since the question was posed back in 2013, the Email extension plugin in Jenkins was updated to support adding "a recipient provider for upstream committers". This feature was added in version 2.39 (Nov 2014)

The link to the plug-in is here: https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin

Accessing this feature is done by adding the Editable Email Notification post-build action to the Tests job and then selecting Advanced Settings. "Upstream committers" will appear as an option under Send To.

检查此链接 ,它提供了一种或多种方法,使用groovy脚本从上游作业中检索可能的罪魁祸首。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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