gabrie-allaigre / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
713 stars 207 forks source link

‘GitLab Commit Issue Publisher’ skipped because one of the required properties is missing #244

Closed ghost closed 5 years ago

ghost commented 5 years ago

Sonarqube 6.7 with sonar-scanner and Gitlab-plugin 3.0.2

Sonar-project.properties file:

sonar.projectKey= sonar.projectName=

sonar.analysis.mode=preview

sonar.sources=

sonar.sourceEncoding=UTF-8

sonar.language=c

sonar.cfamily.build-wrapper-output=

sonar.branch.name= sonar.gitlab.commit_sha= sonar.gitlab.project_id= sonar.gitlab.url= sonar.gitlab.user_token=

Build is successful. But I see the below line in the log and I see no inline comments in gitlab.

DEBUG: ‘GitLab Commit Issue Publisher’ skipped because one of the required properties is missing

And also a new job is created in the end and it says Sonarqube analysis in progress and the job status is pending and it never starts.

edcu11 commented 5 years ago

Were you able to find a solution?

ghost commented 5 years ago

not yet.

lanniu commented 5 years ago

try this "sonar-scanner -X -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME"

ghost commented 5 years ago

Thanks Lanniu. This command worked for me: sonar-scanner -X -Dsonar.analysis.mode=publish -Dsonar.host.url= -Dsonar.login= -Dsonar.password=${password} -Dsonar.gitlab.url= -Dsonar.gitlab.commit_sha=${COMMIT_SHA} -Dsonar.gitlab.project_id=${PROJECT_ID} -Dsonar.gitlab.ref_name=${BRANCH_NAME}