How to keep rules and quality gates in upgrade and what are config files where these rules can be added manually?

q_profiles
q_gate
rules

(Jenni Tyynelä) #1

SonarQube is version 7.1. Is there a way to keep rules and quality gates in upgrade.

How to add rules/quality gates directly to configuration files (and which files) so that those can be added to GIT?


(G Ann Campbell) #2

Hi,

Those things are stored in the database, so that should happen automatically provided that

  1. your upgraded instance points to the same database as your old version
  2. all the same language analyzers are available in the new version that were installed in the old version.

It’s the analyzers that provide the rules (and some profiles) so dropping an analyzer will cause its rules and profiles to disappear. The good news on this front is that from 7.2, the newest versions (at the time of the platform release) of most SonarSource-provided analyzers are installed by default. So you no longer have to remember to re-install your analyzers as part of your upgrade.

HTH,
Ann