Reputation: 1564
I'm trying to understand the overall architecture and flow of the Jenkins Sonar plugin and SonarQube.
When I run the Jenkins Sonar plugin, is the plugin doing the analysis and then sending the reports to SonarQube? Or does the plugin forward the code to SonarQube for the analysis to be done on the SonarQube server?
And how does FindBugs integrate in this process?
In recent weeks, our bugs and code smells reporting have been broken (showing 0) and I'm trying to get a better understanding of the general system flow so I know where I should be focusing my efforts.
Upvotes: 0
Views: 1067
Reputation: 1984
In Sonar, generally sonar-scanner is used to scan the code and it sent the result/reports for displaying on the sonarqube server.
When you use sonar plugin in Jenkins you have to set the path of sonar scanner or you have to install it automatically. (Please refer below)
For FindBugs you can install the plugin on sonarqube server and set it as default for the analysis.
Upvotes: 0
Reputation: 221
I haven't implemented SonarQube, but have played with it on my local workstation off and on for the past year or so and it is my understanding that the Scanner/Plugin does the analysis and sends the report to the SonarQube server. From SonarQube site:
3. The Continuous Integration Server triggers an automatic build, and the execution of the SonarQube Scanner required to run the SonarQube analysis.
4. The analysis report is sent to the SonarQube Server for processing.
5. SonarQube Server processes and stores the analysis report results in the SonarQube Database, and displays the results in the UI.
As far as Findbugs, it is also my understanding that you would no longer really need to use Findbugs. But you could if you want to. I am guessing SQ isn't implementing 100% of what FindBugs does, but should have the most common rules in place. If/When I implement SonarQube, I would no longer use checkstlye/findbugs. If all developers install SonarLint, and you configure the IDEs to read from the SonarQube project settings, everyone would be playing by the same sets of rules, versus relying on developers to configure using the same checkstyle/findbugs settings.
Hope this helps!
Upvotes: 2