mc1arke / sonarqube-community-branch-plugin

A plugin that allows branch analysis and pull request decoration in the Community version of Sonarqube
GNU Lesser General Public License v3.0
2.26k stars 526 forks source link

GitLab MR decoration: new stage and job created #941

Closed mribeiro closed 3 months ago

mribeiro commented 3 months ago

Describe the bug When integrating with GitLab, a new stage named "external" with a job named "SonarQube" is created. By clicking this job, the user is taken to sonarqube page.

To Reproduce Steps to reproduce the behavior:

  1. Create a gitlab-ci pipeline with a job to trigger a scan in sonar
  2. Set the project ID in gitlab
  3. Run the scan in a merge request
  4. Look at the pipeline jobs -- a new job "SonarQube" in stage "external" is created.

Expected behavior No jobs are added

Screenshots image

Software Versions

Additional context nothing to add

mc1arke commented 3 months ago

This is working as per expectations. Sonarqube is decorating your MR with findings, so Gitlab reports this as a job. Since it isn't the output of a step in Gitlab CI it gets reported as an 'External' step.