Config Quality Gates for new project

I was trying to apply my QG (non-default) to my project, it works. But when I create a new branch, it picks up default QG.
Can someone guide me how to configure this?


Hey There,

I’d be happy to help. Can you share your SonarQube version? The answer depends on the version.


Hi @Joshua_Martin, Thank you for the quick response, we are currently using * Community Edition

  • Version 7.8 (build 26217)


Branches usually use the same quality profile set for a certain project. How are you analyzing these branches?

Hi @Joshua_Martin I am very new to Sonar terminologies, I dont know what that exactly means? Can you please provide little more detail?
We are using bamboo for build, github as version control, if that helps in anyway?
If you want me to check some particular settings, I can pull them and share with you.

No worries. The current standard for scanning branches is by using and when scanning that branch (docs for reference). What do you have these set to for the branches you’re scanning?

Thanks for the reply, this doc was very helpful to understand what can be wrong.
As the doc refers to Name of the branch (visible in the UI)

  1. I dont see this setting as a part of our UI, so is it because we are using community version?

I believe what can help resolve issue is but I dont see anything in UI to configure this.
All our projects are in java and we use maven for build
So do I configure in my maven pom file, is it the right place to do so?
2. So something like <>develop</> in maven properties?

Hi @Joshua_Martin did you got a chance to take a look at my reply?

Hey there!

  1. These parameters are available in Developer edition and above. Sorry about that. I misread earlier.
  2. This leads me to believe you’re declaring your branches as separate projects in SonarQube with a type of naming schema. “projectx-main” and “projectx-dev” for example. Is that how you’re doing branches in your SQ server? If so, then quality gates will have to be set separately since SonarQube see the branches as separate projects.
  3. If you upgrade to Developer edition some day, then those branch parameters can be declared in the pom.xml for each respective branch.

Let me know if you have any more questions.