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:
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
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:
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.
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.
Finally, the downstream job must fingerprint the downloaded file. You'll use the same post-build action as in the upstream job.
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.
Skip to end of metadata Go to start of metadata