multibranch-action-triggers-plugin
multibranch-action-triggers-plugin copied to clipboard
When branch is deleted `Run Delete Event` runs multiple times per branch
Describe the bug I've set up Run Delete event for cleaning up some things after the branch is absent. And also set multibranch pipeline scan trigger every 3 min. When Jenkins gets that branch is absent, Run Delete event starts job with params, but a lot of times. The first job is succeeded, but others aren't.
To Reproduce Steps to reproduce the behavior:
- Create multibranch pipeline
- Set Run Delete event job
- Set scan trigger (for me it's each 3 mins)
- create and delete branches and see
Expected behavior Specified job runs once.
Screenshots

Versions:
- Jenkins 2.366
- Plugin 1.8.6
- Java 11 at controller
Hi @none0nfg
Is this still happening ?
This is happening to us in some form that is potentially different than OP's (not sure). When a Pull Request is closed (and maybe when a branch is deleted, haven't had the chance to check), it seems that the event is called once per build rather than once for the whole PR.
But this doesn't occur on our second jenkins instance where the on-delete job does not have the SOURCE_RUN_NUMBER and SOURCE_RUN_DISPLAY_NAME parameters. Instead, it only runs once. Maybe that's intended behavior, but I didn't see it in the documentation.
Let me check this.