0
votes

I am using Github pull request builder and sonarqube plugin in jenkins ci.Everytime a pull request is opened a jenkins job must run using sonarscanner to analyse code faults and then publish inline comments on PR and block merging option if there are some issues.My concern is that even though sonar scanner is analysing the code everytime a PR hits but no inline comments are published for the same.

my sonar properties are as follows:

sonar.projectKey=test
sonar.projectName=Url-Shortener
sonar.projectVersion=1.0
sonar.report.export.path=report-task.txt
sonar.sources=app, config, db, lib
sonar.exclusions=app/assets/**/*
sonar.verbose=true
sonar.login=admin
sonar.password=admin
sonar.scm.enabled=true
sonar.scm-stats.enabled=true

-Dsonar.sourceEncoding=UTF-8
-Dsonar.analysis.mode=preview
-Dsonar.github.repository=jrepository name
-Dsonar.verbose=true 
-Dsonar.github.pullRequest=${ghprbPullId}
-Dsonar.github.login=login id
-Dsonar.github.oauth=oth token

I am also trying to build post build actions but unsuccessful

Thank you in advance

1
Which version of the Sonarqube you are using? Also, is it community edition? - Vighnesh Pai
version is 7.2 and it is community edition - Priya

1 Answers

0
votes

Pull request analysis is a part of developer edition and above. So, you'll have to buy license for this to get work.

Reference doc: https://docs.sonarqube.org/7.4/analysis/pull-request/