Hi Ann,
thanks for coming back to me. So, sonar.projectCreation.mainBranchName
was indeed new to me, I haven’t looked into more recent (~12 months) development of the sonarqube plugin. Nice to see that it is finally there.
Parent project…
This is a new one on me. I invite you to create a new thread to explain this use case. We’d be interested to see it.
Use case is pretty simple. I want my project structure be defined through analysis metadata. Each time I have to go to Sonarqube’s UI to do things manually, such as
- moving projects under the correct parent project umbrella
- assigning a set of new projects quality gates / quality profiles not based on used languages, but parent project (i.e. what the specific team decided upon)
- manually removing projects that are no longer analyzed within a parent project, because they got renamed / removed
I loose time and also patience with Sonarqube. Sonarqube should allow me to define sensible defaults for all of this via parent projects.
That’s a choice made by whomever constructed your pipeline. Extra steps are required to put your “build stability at risk when quality gates are used”. So you should talk to whomever it was that decided a build that doesn’t meet your own internal standards should be blocked.
The issue is not that this is “decided” by somebody or that this can be questioned, the issue is how this concept of quality gates and quality rules is implemented in Sonarqube. See, as long as I use Sonarqube just as a fancy quality window into my applications, everything is fine. But when people see “oh, you can make your build break based on quality gates, cool” problems begin. Because then these configurations that are made in an external, unversioned system as Sonarqube suddenly make your build dependent on this very configuration. So if the team creates a release and moves on their development branch with changed settings (either new rules are introduced by a SQ update, rules severity are adapted, quality gates are adapted, whatever), then the Sonarqube analysis, when guarded with a quality gate, will likely break the hotfix release process.
You might say “well, then disable quality gates on release branches”, but then why have them anywhere enabled in the first place? I want all builds to break, when things are violated. And I accomplish this today, still, by including build-level tooling (Spotbugs, KtLint, Detekt, PMD, …) because there the configuration is versioned along with the code, just like in the “old days” of Sonarqube where Sonarqube was merely a frontend for local tool execution.
Thanks for listening,
Thomas.