Team, sonar2gerrit plugin v377.v8f3808963dc5 is installed on my jenkins and am not sure if am missing any flag or is this feature not available.
sonar2gerrit plugin is just posting scan results as comments without coverage percentage.
sonar plugin is posting comment to gerrit patchset in pull branch analysis but not posting anything about coverage. I am passing coverage file as parameter to sonar scan and it shows me coverage on sonarqube gui but i want to reflect on gerrit also. is there something am missing?
sonar-scanner -X \
-Dsonar.pullrequest.key="${GERRIT_CHANGE_NUMBER}-${GERRIT_PATCHSET_NUMBER}" \
-Dsonar.pullrequest.base="${GERRIT_BRANCH}" \
-Dsonar.pullrequest.branch="${GERRIT_REFSPEC}" \
-Dsonar.inclusions=${src_file_paths} \
-Dsonar.sources=${infra_source_path} \
-Dsonar.coverageReportPaths=$coverage_file \
-Dsonar.exclusions=**/*.tf,src/**/test/*,src/**/test/**/*,src/**/**/*.tf \
pipeline
sonarToGerrit(
inspectionConfig: [
analysisStrategy: pullRequest(),
// serverURL: ${RUN_SONAR_URL}
],
// /* Optional parameters to test
reviewConfig: [
commentType: 'ROBOT', // 'STANDARD' or 'ROBOT'
issueFilterConfig : [
severity : 'INFO',
newIssuesOnly : false,
changedLinesOnly: false,
includedPathsGlobPattern: null,
excludedPathsGlobPattern: null,
],
noIssuesTitleTemplate : 'SonarQube violations have not been found.',
someIssuesTitleTemplate: '<total_count> SonarQube violations have been found.',
// issueCommentTemplate : '<severity> SonarQube violation:\n\n\n<message>\n\n\nRead more: <rule_url>'
issueCommentTemplate : "'<severity> SonarQube violation:\n\n\n<message>\n\n\nRead more:' ${RUN_SONAR_URL}/coding_rules"
],
scoreConfig: [
issueFilterConfig: [
severity : 'INFO',
newIssuesOnly : false,
changedLinesOnly: false,
includedPathsGlobPattern: null,
excludedPathsGlobPattern: null,
],
category : 'Code-Review',
noIssuesScore : 0,
issuesScore : -1
],
notificationConfig: [
noIssuesNotificationRecipient : 'NONE',
commentedIssuesNotificationRecipient: 'OWNER',
negativeScoreNotificationRecipient : 'OWNER'
]
// ],
*/
)
}