Queries on SonarQube 8.4v

Hello Team,

I’m Using SonarQube 8.4 and would need your suggestion on the following:

1.We have develop as a main branch but when i run a build from develop branch it looks for master branch as that is defined as main branch by sonar so everytime I have to run a build from Jenkins to create a project and then rename master branch as develop to make things look good but is there a way that this could be done automatically without me manually doing the above process?

  1. For PR decorations, The projects is created when jenkins performs build and then passes the analysis to sonarqube so it is neither manually and nor through bitbucket so instead of manually adding PR decorations parameter is there any alternate way to get the configs added because from sonar document for 7.7 i do see sonar.pullrequest.bitbucketserver.project parameters could be passed through properties but doesnt seem to work with 8.4.

  2. Project creation through bitbucket: when i opt for creating projects from Bitbucket and despite of having admin access it lists only first 8 projects whereas I have almost 50 projects and there is no icon indicating pages.

Please suggest.


You’re going to need to create the project and rename the branch, but you don’t have to run an analysis to do that. You can Provision your project. That creates the project shell. From there you can go to Project Settings -> Branches & Pull Requests, then use the cog menu on the master/main branch to “Rename branch”.

It seems odd to me that you’re only creating projects at first PR analysis. I would think you’d want your projects under analysis before that. There’s something to be examined in this workflow (e.g. should the PRs be pointed at an existing project?)

You don’t mention your CI. We’ve done some work to read PR configs from the env in recent versions. You should check the docs for the latest on your CI.

Yeah… things change from version to version. If it’s not in the 8.4 docs then it’s probably not in 8.4. :smiley:

Could you start a separate thread for this, please?


CI is Jenkins and SCM is Bitbucket.

Sure, created this : Issue creating project using Bitbucket

@ganncamp I have one more query, since we dont use master branch would there be any issue if we dont define main branch? And just have develop branch as another branch by defining develop branch in this parameter: Branches to keep when inactive.

Or is it mandatory to define main branch as develop in sonarqube? also is there any advantage of declaring develop as main branch instead of keeping it as a branch.


You’re going to find it makes your life easier to analyze develop as your main branch. That way you actually get a populated homepage for the project, versus having to then navigate to the develop branch, and you get values populated into the Projects page.


Understood, so apart from navigation perspective there isn’t any other issue associated right?


No, I don’t think so.