-
Notifications
You must be signed in to change notification settings - Fork 354
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
Bitbucket multibranch project doesn't disable the branch job after creating a PR #539
Comments
I never was able to get this working reliably - even with the github-branch-source plugin. It might be a limitation in the design how Jenkins handles events. Usually what I do to avoid this is adding a "named build strategy" to explicitly only build branches I want to build (outside of PRs), usually this would be either the default or a dev branch: |
@lifeofguenter so I would have to add the third one for named branches? As in our case they want everything to run on Jenkins from the moment the branch is created |
Hi @lifeofguenter, as this is the origin of my duplicated issue #574 I'm asking here. Is it possible to trigger branch-(re)indexing once web hook has been received to enforce deletion of the branch? |
This is nasty bugg. When we push a new branch it starts building that branch immediately and if i create a PR 20 seconds later for that branch, both the branch build and the PR build will continue to run and waste CI resources. My hooks in bitbucket are setup like this: "%s/bitbucket-scmsource-hook/notify?server_url=%s"
The problematic event is repo:refs_changed. If i enable that this problem occurs, and if i dont enable it it will only build PRs and never for example master after i merge to master. |
Jenkins and plugins versions report
Hello
I am using Jenkins on kubernetes using a helm chart together with JCASC. I am using the lts-jdk11 image (Jenkins version 2.319.1).
I have configured my multibranch project with the Bitbucket branch source. I use the following properties: discover pull requests "HEAD", discover branches "EXCLUDE_PRS".
Its all working fine, when I create a branch, it gets checked out and ran. But when I create a PR, I noticed that the Pull Request is discovered and ran, but the branch itself (under Branches tab) is not being disabled. Is there something I need to configure or is this normal behaviour?
What Operating System are you using (both controller, and any agents involved in the problem)?
Controller is running in EKS.
Reproduction steps
Setup multibranch project for a Bitbucket single repo.
Select Discover branches "EXCLUDE_PRS"
Select Discover prs "HEAD"
Expected Results
When I create a PR, the branch itself (under branches) would be disabled. (Project rescan triggered)
When I decline the PR, the PR is disabled (this is the case), but the branch itself is not rescanned.
Actual Results
When I create a PR, the multibranch branch project is not rescanned so the branch is not being disabled.
When I decline a PR, the multibranch branch project is not rescanned so the branch is not being rediscovered
Anything else?
No response
The text was updated successfully, but these errors were encountered: