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 208 forks source link

publish mode + branch plugin #135

Open encodeering opened 6 years ago

encodeering commented 6 years ago

Hey, we are using both, gitlab and branch plugin, and it seems that the branch plugin comes with an internal quality gate.

https://docs.sonarqube.org/display/PLUG/Branch+Plugin For short-lived branches, there is a kind of hard-coded quality gate focusing only on new issues. Its status is reflected by the green|red signal associated with each short-lived branch:

status: green / OK or red / ERROR error conditions: new_bugs > 0 new_vulnerabilities > 0 new_code_smells > 0

We see an additional external job node in the pipeline, which hasn't been configured within gitlab-ci.yml, so I would assume that its provided by this plugin.

The analysis job succeeds which is fine, but the external job fails which lets the whole pipeline fail.

We would like to use the publish mode in order to see the branch analysis in sonar as well. So, would it be possible to disable the build breaker functionality in gitlab for the external node?

Info:

Sonar (7.1)
GitLab Plugin for Reporting (3.0.1)
Branch Plugin (7)

-Dsonar.host.url=${SONAR_URL} -Dsonar.login=${SONAR_LOGIN} -Dsonar.branch.name=${CI_COMMIT_REF_NAME} -Dsonar.gitlab.commit_sha=${CI_COMMIT_SHA} -Dsonar.gitlab.ref_name=${CI_COMMIT_REF_NAME} -Dsonar.gitlab.project_id=${CI_PROJECT_ID}

Cheers

rafaelaguerra commented 5 years ago

can sonar.gitlab.failure_notification_mode helps?