Jirong Hu
Jirong Hu

Reputation: 2375

How to organize projects in SonarQube?

I am looking into a way to organize projects in SonarQube, and find out I have to pay for such a thing:http://www.sonarqube.org/bring-a-new-dimension-to-sonar-with-the-views-plugin/. Compare to everything is free in Jenkins, this product starts to surprise me. Is there any other free plugin available for this purpose? Another thing is I am trying to get an evaluation license for PL/SQL (have to pay for this too), but got no reply after two days. Guess this product has no competitors.

Upvotes: 9

Views: 10291

Answers (2)

Tien Hoang
Tien Hoang

Reputation: 743

This is a paid feature of SonarQube, so look like all plugin recommended above are now removed.

Upvotes: 1

AKS
AKS

Reputation: 17326

SonarQube is free. You run project analysis (after getting / running unit tests, static code analysis, code coverage jacoco/cobertura, jmeter performance testing etc) or some analysis using sonar based analysis mechanism.

There are free and some commercial plugins available within SonarQube that you can download/install (trial/full license) and get what the commercial paid plugin offers.

One of those plugin is "Views portfolio plugin". It's easy to download / install (check SonarQube documentation on how to get/install plugins).

For organizing projects, you have to create new dashboards, views, measures and use those in widgets. See this first: http://docs.sonarqube.org/display/PLUG/Views+plugin and http://www.sonarqube.org/everythings-a-component/

Once Views portfolio plugin is installed, you have to do the following:

  1. Make sure you are using latest / newer version of SonarQube 5.1.x and sonar-runner 2.4+

  2. Install the latest / stable Views portfolio plugin.

  3. Create new Views, sub-views (inside a View).

  4. Create new Measures and Filters. See few post/links below.

  5. Run sonar analysis (for ex: run sonarRunner task in Gradle or sonar-runner standalone analysis in project's workspace) on some/all projects you have.

  6. Run "sonar-runner views" (create Jenkins job). This will populate all the Views / sub-views that you have created with the latest sonar data.

  7. At this point, create new Dashboards / default dashboard per team, per project type, per location etc and use the filters, views, measures in the widgets.

  8. Any time you'll run sonarqube analysis on a project, you have to assign that project in ONE of the View or its Sub-View and again make sure to run "sonar-runner views" (at command / $ prompt or via Jenkins Execute Shell build step).

NOTE: Views portfolio plugin doesn't treat ALL Sonar based projects's metrics as components but most of those project metrics can be treated/read by Views portfolio plugin as "components".

For ex: see here: SonarQube - Views Portfolio Plugin aka Helicopter View nemo - Combined all projects metrics

Other useful links: SonarQube - Views Portfolio Plugin - Project vs Filter Motion Chart and SonarQube - Views Portfolio Plugin aka Helicopter View nemo - Combined all projects metrics

Upvotes: 6

Related Questions