Quality gate per branch

Hi,

We’re using SonarQube 7.9.1 Developer Edition.

Is there a way to define a Quality Gate at branch level only? We have a project with several long-lived branches (for different releases we have to maintain), and we’d like to change the quality gate for one branch only, because tremendous improvements have been made. We cannot change the previous quality gate because it would break the legacy branches, so we want to create another quality gate, with more restrictions, and apply it for the new branches.

Thanks for any help,
Damien Coraboeuf

Hello Damien,

No there is no such option, we enforce at SonarSource the fact that a QG is a project-based concept. Actually it should even be a more general level because we usually encourage users to not have a myriad of QG but rather one, or few at least (see that on the doc).

But this:

should not be a concern. Remember that your same QG can define conditions on the overall code (more accurately the Not New code) and conditions on New code only. If you have strict enough conditions on New Code, it’s not possible to deteriorate the improving quality of the code, quite the opposite actually. Everything that comes in has to be good quality code.

Does it make sense?

Antoine

1 Like

This makes sense, we’ll adapt our process accordingly.

Thanks,
Damien