'Jenkins not triggering build on PR merged in bitbucket
We are using Bitbucket cloud to host our repos and Jenkins for CI/CD.
I have setup a multibranch pipeline which has develop and release branches. I want to trigger develop branch whenever a PR is merged from the feature branches to develop a branch (In fact on any manual webhook edit).
Below are the cases I tried:
- Setup Manage hook in Jenkin:
- This creates a webhook in bitbucket and when PR is merged, build is triggered.
- But when I disable the Repository Push option in the webhook, the build is not triggering on PR merge.
- Setup the webhook manually:
- In this case, the Jenkins logs show the branch name as PR-XY since not triggering the develop branch.
- I have set up a regex to filter branches (only develop and release are allowed) and when I add regex like PR(.*) then build gets triggers from the PR section (not desired case).
I want the build to be triggered from the develop branch, not as the PR branch. I have followed most of the options available in the forums but it's not working. Any help regarding this will be appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
