Share quality profiles across branches

Hi,

I am using sonarqube 6.7.6 and have the follow problem:
We have different projects, every project wants to use a different quality profile.
These projects contain different modules,which are different stash repositories. When starting to implement a new version we create new feature/release branches. In the past we could configure the profile to be used in the commandline when running sonarqube from gradle, but since some releases we have to reconfigure the used profile in sonarqube itself for every branch because every branch results in a new project in sonarqube. Yes - we could do this via bulk change, but this is not ideal. Is there a possibility to set a profile for let’s say a collection of projects, which names start with a specific string (project1* should always use profile 1, project2* should always use profile2…)?

Would be nice to get feedback.
Cheers
Markus

Hi,

My first feedback is that 6.7.6 is past EOL & you should upgrade at your earliest convenience. :slightly_smiling_face:

Another option is via web services. This would involve scripting your CI to create your new branch/project via configuration & then calling the web service to assign the profile of choice before the first analysis. I recognize that you probably won’t find this to be idea either. But I wanted to throw it out there.

Sorry, no. We haven’t put a lot of effort into this specialist profile configuration (and probably won’t) because we believe the default profile should represent the company norm and thus be non-controversial in its application to the majority projects (and their branches). This applies even to the crufty old projects that have a lot of technical debt - if you’re focusing on the issues raised on new code, it won’t matter if the default profile contains “strict” rules because it’s entirely reasonable to expect strictness from the code that’s written today.

… Okay, I’ll get off my soapbox now.

Maybe this helps.

 
:woman_shrugging:
Ann

Hi Ann,

thanks for your reply.
for calming you down, I am preparing an update to version 7.9.3 :wink: so everything is fine again.
This is a major step for us, because we are using mysql and have to migrate to another DB. I have tested the DB migration tool so far, and it is a very great help for this task :+1:

I see your argumentation that there should be a company norm. But we have different projects and these projects want different rules, not for sake of getting better overview (new against old code), but because they have very different implications and so the rule, which is important in the one project, is not important in the other project. So we have decided that every project can define it’s own profile.
As you have no built in feature to cover this need I like your suggestion to create and configure my projects in CI by rest api. I will implement this.
Thanks a lot
Markus

1 Like