Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a user from recipients of Jenkins build failure email

I'm receiving daily "Jenkins build is unstable" emails for a project I'm no longer working on.

I can see from the build result (build.xml) that I'm in the list of "culprits", because of a commit I made some time ago, and since the build has been unstable for weeks, the list of culprits hasn't been cleared.

Since I'm no longer working on this project, I want to stop receiving email notifications from this Jenkins job. How can I remove myself from the recipients? Should I edit the build.xml of the last build? (EDIT: apparently this approach doesn't work)

like image 332
Thomas Levesque Avatar asked Mar 12 '14 09:03

Thomas Levesque


People also ask

Can Jenkins send email on failure?

When there is a build failure or any changes in the build state, we must get notified immediately through e-mail. so that we can fix the issue at the earliest. There is a mailer plugin available in Jenkins that has be installed and configure it based on the requirement.

How do I fix Jenkins build failure?

In Jenkins, in the pipeline where the failure occurred, in the navigation pane, click Rebuild. In the Rebuild page, select the ReRun check box , and click Rebuild.

What happens if build fails in Jenkins?

The Build Failure Analyzer Jenkins plugin analyzes the causes of failed builds and presents the causes on the build page. It does this by using a knowledge base of build failure causes maintained from scratch.


Video Answer


1 Answers

It is possible, but a little complicated. First, you need to stop Jenkins or send it to quiet mode to avoid further builds.

As the actual list of culprits is calculated at runtime from all recently failed builds, you need to remove your ID from the culprits list in the build.xml of all failed builds (since the last successful one) where it is listed.

Finally restart Jenkins so the internal data structure is updated from the modified build.xmls.

So, if build 10 was the last successful one, you need to remove the ID from builds/11/build.xml, builds/12/build.xml, etc.

like image 127
Andreas Avatar answered Oct 06 '22 11:10

Andreas