multibranch-action-triggers-plugin icon indicating copy to clipboard operation
multibranch-action-triggers-plugin copied to clipboard

When branch is deleted `Run Delete Event` runs multiple times per branch

Open none0nfg opened this issue 3 years ago • 3 comments

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:

  1. Create multibranch pipeline
  2. Set Run Delete event job
  3. Set scan trigger (for me it's each 3 mins)
  4. create and delete branches and see

Expected behavior Specified job runs once.

Screenshots image

Versions:

  • Jenkins 2.366
  • Plugin 1.8.6
  • Java 11 at controller

none0nfg avatar Sep 29 '22 21:09 none0nfg

Hi @none0nfg

Is this still happening ?

aytuncbeken avatar Jun 01 '24 14:06 aytuncbeken

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.

nickajacks1 avatar Jun 18 '24 19:06 nickajacks1

Let me check this.

aytuncbeken avatar Jul 01 '24 09:07 aytuncbeken