Blame Upstream Committers1.2Minimum Jenkins requirement: 1.375ID: blame-upstream-commiters
This is a simple plugin that adds a post build action to mail upstream committers when a build fails. This plugin is useful when you have a downstream job that uses an artifact produced by an upstream build.
Once you install the plugin, ensure that it is properly installed by looking at the bottom of the job's configuration page, where the following checkbox should be available:
Mail upstream committers when the build fails
It is important to notice that:
- Only builds that are actually triggered by an upstream build will actually send the mail
- If the upstream job did not include any SCM update at all, it won't trigger the mail (as expected)
This plugin is only capable of blaming upstream committers if the job is linked by some dependency to the upstream job. The relation is created using fingerprints. Look how to fingerprint here or just follow the steps below for a quick start.
1. Create the upstream/downstream relationship by setting editing the downstream job and entering information in the following field:
Build after other projects are built
Enter the upstream project name in the input box. It is also possible to create the same relationship by editing the upstream job configuration
Build other projects
Both method will work for our purposes
2. Dependency link
This plugin works when the downstream job uses an artifact produced by the upstream job. To create such relationship you'll need to setup the downstream job in such a way that it fetchs the upstream's produced artifact and this artifact must be fingerprinted in both jobs. Let's see how to do that:
2.1 Fingerprint the artifact to be used in the upstream job
In the Post-build Actions section, you'l find the following option:
Record fingerprints of files to track usage
When this option is checked, a "Files to fingerprint" input box will become avaiable. You can specify the file explicitly or using wildcards. Just make sure the file to be used by the downstream job is fingerprinted.
Notice that if this is a Maven project, this option will not be available. In fact, maven jobs automatically fingerprints any produced jars that are archived.
2.2 Fetch the required artifact in the downstream job
You'll have to find a way to get the produced artifact. If both jobs are executed in the same computer, you can just copy the file from the workspace. This is not such a good option, since it forces both jobs workspaces to be in the same filesystem. A better option is to download the file somehow (for example, using wget or an ant task) from the upstream's urls.
2.3 Fingerprint the artifact in the downstream job
Finally, the downstream job must fingerprint the downloaded file. You'll use the same post-build action as in the upstream job.
2.4 Check the "Mail upstream committers when the job fails"
That's all you need to go.
Once you follow the above steps, the jobs will be properly linked and the upstream committers will be mailed when the downstream job fails.
Version 1.2 (Sept 15, 2010)
- Fixed a bug when an upstream project contained a space character in its name, see JENKINS-7322
Version 1.1 (Jan 21, 2010)
- No functional change, just fixing plugin name/version
Version 1.0 (Oct 9, 2009)
- Initial release