Sonarqube 2.2.1 Plugin Issues

plugins

(CRG) #1

I’m using the following:

  • gradle 3.2.1
  • Office Sonarqube 2.2.1 gradle plugin configured to use preview analysis mode and sonar.issuesReport.json.enable set to true
  • Sonarqube 6.1
  • Community Sonarqube Builder Breaker plugin 2.1 properly installed on Sonarqube
    https://github.com/SonarQubeCommunity/sonar-build-breaker

My project has a quality gate assigned. I’m running into a couple of problems:

  1. the sonar json report is either not being created or not put in the standard place. I have no problems with this with older versions of Sonarqube itself and the gradle sonar plugin.

  2. the gradle sonar plugin excludes the build breaker plugin.

“09:56:48.595 [INFO] [org.sonarqube.gradle.SonarQubeTask] Exclude plugins: devcockpit, buildstability, pdfreport, report, scmstats, buildbreaker, views, jira”

I added this property setting: ‘sonar.buildbreaker.skip’, false

Up to this point I’ve been able to fail the build in gradle itself by parsing the sonar json file and checking for issues. Since this file isn’t apparently being produced, I added the sonarqube community buildbreaker plugin, hoping it would fail the build for me. As mentioned above, the buildbreaker plugin isn’t being loaded.

The sonar html report is being produced, however. I purposefully introduced coding problems to ensure something shows up in the report.

Btw, the sonarqube task reports that the html report is being deprecated:

“HTML report is deprecated. Use SonarLint CLI to have local reports of issues”