1
votes

I have a Jenkins job which build server different types of products.

Only for some of the products am I interested in receiving an email notification whether the build failed or not.

Different parameters are passed to builds within Jenkins including "product", "releaseBranch" etc.

How can I selectively receive emails based on type of product I am building? Does Jenkins have a plugin for this?

2

2 Answers

1
votes

The easiest way to do this would be to create a separate Jenkins job (project) for each product. This would have the advantage that you could look at the build history for each job and know immediately which product was built by a given build.

0
votes

Use "Editable Email Notification" plugin and add the trigger named "Script". Here you can write a groovy script which can decide the email notification to be sent or not.