We are using the Parameterized Builds plugin and a matrix combination parameter. So now, when we build this job, we select which of the combinations we want to build and one "child job" is created for each one that is selected.
Each of these jobs runs their build steps and post build actions. However, I have also noticed that the post build actions run for the "parent job" as well.
For example, we have the job configured to post a message to Slack upon success. Now, if I build the job with parameters and select one configuration to build, I will get two Slack notifications. One for the main job and one for the selected configuration.
Example Slack output, note one with the config selected and one without:
| My Jenkins Project » My Job » my config - #51 Success after 1 min 54 sec (Open)
| My Jenkins Project » My Job - #51 Success after 1 min 55 sec (Open)
So my question is, how can I prevent post build actions from running on the main job?
EDIT: Since creating this question I found this GitHub issue on the Slack plugin that describes exactly what I'm seeing. So it looks like this functionality should be up to the plugins and that a new version caused a regression in this particular plugin.
Perhaps the question is better suited as: Is it a plugin's responsibility to determine whether it is running in the global job or in a configuration job as part of a multi-configuration project?