Hi Ann,
Thanks for your reply. I have definitely created a PR, and bitbucket is showing a build status against it.
The Jenkins build is against the branch, the PR isn’t shown in Jenkins at all. I don’t know if it’s because of the missing ‘Discover pull requests from origin’ setting in the Bitbucket Branch Source plugin. I found something online (can’t find the page now) saying I should add pull-requests/*/from
to Discover other refs
in the Branch Source configuration, and now I have a separate job in Jenkins for the PR. This means I’d now need two separate builds, one for the branch and one for the PR. Additionally the PR build doesn’t build automatically when I do a new push to the branch (which is the source branch for the PR), for reasons I’ve yet to discover. Is this really the way it’s meant to be set up?
When the Jenkins build for the PR finally completed, there was this in the log:
10:55:19.372 INFO: Auto-configuring branch 'pull-requests-24'
So Jenkins was still treating it as a branch rather than a PR, and SonarQube still does not have any awareness of any PRs on its GUI. Not sure where to go from here, any other ideas?
Thanks,
Phil