Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When branch is deleted Run Delete Event runs multiple times per branch #26

Open
none0nfg opened this issue Sep 29, 2022 · 3 comments
Open

Comments

@none0nfg
Copy link

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
@aytuncbeken
Copy link
Contributor

Hi @none0nfg

Is this still happening ?

@nickajacks1
Copy link

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.

@aytuncbeken
Copy link
Contributor

Let me check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants