Gitlab EE integration to SonarQube Developer Edition

Hello,

Please help. I’m in a fix. I was mandated to explore the Gitlab integration to SonarQube in an attempt to justify why we need the Gitlab Developer Edition.

Currently, I am using the following versions: SonarQube Developer Edition Version 7.6 (build 21501), GitLab Enterprise Edition [11.8.1-ee]

My goal is to demo the following:

  1. Test coverage on SonarQube
  2. On-the-fly analysis of merge (pull) requests sent on Gitlab such that merge requests cannot be approved if there are violations on SonarQube

So far, I have been able to achieve the test coverage bit by incorporating the Jacoco coverage plugin. However, I have not had same luck with the pull requests analysis.

First, the marketplace on the trial version of my SonarQube Developer Edition does not show the Gitlab integration option like we have on the Community Edition. Secondly, and this is meant to be a good thing, the CI job on gitlab (configured on .gitlab-ci.yml file) runs seamlessly and I can see reports on my SonarQube installation. However, there are still no comments in the MR. Please see my .gitlab-ci.yml config below:

What could I be doing wrong? Do I need the gitlab plugin for the SonarQube Developer Edition in order to complete the integration to Gitlab? If yes, Is it available for the Developer Edition with a trial license? Is merge request analysis with inline comments on Gitlab achievable with this integration? Lastly, if the project shows ‘Passed’ on the dashboard interface but with some bugs, should I not expect comments on the bugs on the Gitlab UI?

Hi,

You’re not doing anything wrong. Markup/annotation of PRs within Gitlab simply isn’t available. We easily have what we need to integrate with GitHub. The BitBucket folks were happy to work with us, and IIRC, I believe we got support on the TFS side as well. Can’t say the same for GitLab. :no_mouth:

 
Ann

Thanks for the feedback Ann. I’ll look for alternatives then

We are also using the Developer version and we recently upgraded from 7.2 to 7.7 before rolling back as the Gitlab integration is no more supported.

The source code of the plugin is available on Github, and I am quite sure the developer may accept and handover (https://github.com/gabrie-allaigre/sonar-gitlab-plugin/issues/222#issuecomment-475560316)

So now, the key question is: Does the Sonar team wants to maintain the Gitlab plugin, or do we have to move to another solution?

We agreed internally to stick on the version 7.2 until end of Q2 2019. Then, we will move to another solution is Gitlab is not supported.

Best

Hi,

We will not be supporting that plugin. In fact, SonarQube 7.7 removes the deprecated feature that plugin relied on.

IIWY, I’d try raising this with the GitLab folks.

 
:wink:
Ann

It’s your bet, but if not integration with Gitlab is offered, we will move to an alternative solution.
Leaving Gitlab is too complex, while leaving Sonar is much easier and with limited impacts.

We were happy to work with Sonar, but it is not acceptable that no integration is offered with Gitlab (while you support the Github plugin).

Best

Hi,

I agree with all, about no gitlab support in SonarQube. That’s just mandatory today.
Check the market share : 17%
(random site from google)

Nevertheless, I just patched sonar-gitlab-plugin, for SonarQube 7.7, and contacted the main developer who could merge it.
Check the PR : https://github.com/gabrie-allaigre/sonar-gitlab-plugin/pull/226
To use a snapshot, just mvn clean install the PR, and copy the jar in your extension directory.

Maybe SonarSource and/or Gitlab may contribute to this plugin that does the job (very well) ?

Regards,

1 Like

Hi,

FYI

 
Ann