We are using SonarQube Data center edition 8.9, Bitbucket 7.6.0 and Sonar-scanner-4.6.2.
- Branch Analysis:
If we are creating any new branches (Ex: feature) in Bitbucket and running the builds in Jenkins by selecting the specific branches to build as newly created branch(Ex: feature) , newly created branch from bitbucket is not reflecting in SonarQube dashboard and by default master branch is getting build.
**Note:**But if we are passing the sonar.branch.name=feature parameter in sonar-project.Properties file in bitbucket repository, we are able to see the newly created branch (Ex:feature) in SonarQube dashboard.
Is it possible to detect the newly created branches automatically in SonarQube from Bitbucket. If yes, what are the configurations to be required?
- Pull request Analysis:
If we are creating any pull requests from Bitbucket(Ex: Created pull request for feature to master branch), then running the build in Jenkins by selecting the Branches to Build as “feature” in Jenkins. Pull Request is not reflecting in the SonarQube dashboard.
We have Integrated the Bitbucket servers and SonarQube at Global and Project level Configurations as per the below SonarQube official documentation links.
Does SonarQube detects the branches and Pull Requests from Bitbucket automatically or do we need to pass any parameters?