SonarQube Community Edition Version 9.4 (build 54424)
I want to scan different projects using same sonarqube scanner instance.
I have a requirement to setup sonarqube in my organization that has number of different projects. I have also setup jenkins. Let me know if there is any information.
If you visit your SonarQube instance, you can create projects via the “Add Project” UI button near the top right of the page. This way, you can create a SonarQube project for each project you want to analyze.
Once you’ve added a project, you will be prompted to create an access token and define the language of the project to scan. Though I don’t use the scanner in a Jenkins settings, I’m relatively certain all you need to do is define the scanner project-key property within each project’s CI workflow. I’d advise you to check the documentation for SonarQube integration on Jenkins for further information.
Let me rephrase the question. Suppose I have 4 different projects (.NET projects) with 4 different developers. If all the 4 developers tries to scan using single Sonarqube Instance at the same time, will there be conflict or lock type of problem?
interesting question! I don’t know exactly how the inner workings of SonarQube function, but I suppose it’s some sort of queue.
If all developers were to scan the same project at the same time, I do not know what would happen. Here, an expert would have to weigh in, so I suppose that we shall have to wait for that.
If all developers scan different projects at the same time, I don’t suppose there would be any sort of conflict or lock type of problem, since they’re analyzing completely different projects. More likely, I would assume, the projects would be analyzed in the order of their time of submission. Perhaps even concurrently depending on the resources allocated to SonarQube.
I look forward to a response from someone more experience than myself!
SonarQube analysis happens in two parts – when the scanner is executed (typically in a CI context, like in Jenkins) and when the report is received by the SonarQube server.
At the scanner-level, there should be nothing to worry about. The analyses will happen independently of each other. The analyses aren’t even aware the other is occuring.
At the server-level… there’s also nothing to worry about. SonarQube will process reports in the order that they are received. While the Enterprise Edition will also up to 10 reports to be processed simultaneously, it still won’t let two analyses of the same project process concurrently.