Closed Czternasty closed 6 years ago
Hi,
Change -Dsonar.gitlab.ref_name=$GIT_COMMIT
by -Dsonar.gitlab.ref_name=$GIT_BRANCH
Hi Gabriel,
It's work, thank you a lot!
I'm having the same issue.
Running the following script:
mvn --batch-mode -e -X verify sonar:sonar \
-Dsonar.branch=${GIT_BRANCH} \
-Dsonar.gitlab.project_id=${config.gitLabProjectId} \
-Dsonar.gitlab.commit_sha=${GIT_COMMIT} \
-Dsonar.gitlab.ref_name=${GIT_BRANCH} \
Results in:
Report status=failed, desc=SonarQube reported QualityGate is error, with 5 error and 1 warn and 4 ok, no issues
The comment is created but it reports no issues. It only shows the failed quality gate.
Hello Gabriel,
I'm trying to setup the plugin on Sonar 7.1, but I can't make it works without using the
-Dsonar.analysis.mode=preview
parameter.(Between each run, I create obvious Sonar issues) With
-Dsonar.analysis.mode=preview
my maven log says :And issues are posted on Gitlab, but are not saved in SonarQube.
If I remove the
-Dsonar.analysis.mode=preview
, the maven log is:So the created issue is not reported on the commit.
My mvn command is:
I've tested with the version 3 and with the last snapshot of the plugin.
So does the plugin support Sonar 7.1? And does the plugin works with default
sonar.analysis.mode
?Thanks.