Build splited to 2 stages in one repo

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube - developer)
  • how is SonarQube deployed: Docker

I have project where I have server part in docker and windows wpf client, both part shares some of codebase. My build process is splitted to building docker on linux host and client on windows agent. How to correctly configure sonarqube to deal with such scenario?
At the moment I’m building both part on windows stage just to make soranr scanner analysis, but that makes build process longer, I want to somehow split that to build only once in correct stage. Probably it’s monorepo scenario but I have only developer edition. Any hints how to do that correctly?


Welcome to the community!

It’s not clear what the problem is with just analyzing from each of your two builds. Are you concerned about double-analysis of the shared code? If so, you could exclude it in one of the analyses.


Hi, thanks for reply, exclude can fix issue with double analyses. But remains issue with pull requests, when in PR are changes from both parts, how it will works? should I have 2 projects in sonar or one? but PR will be common so what about comments in PR during analysys?


Ah. Okay. I understand now.

Yes, this is probably a monorepo question since in SonarQube each build process is typically a separate project.

What languages are we talking about here? Not every language requires the project to be built in order to analyze…


all is in c#


Unfortunately, C# is one of the languages that does require a build, as you’re likely already aware.

As a result, I’m not seeing any good workarounds.