SonarCloud + GitLab = ❤️

Hi dear :sonarcloud: community!

We are happy to announce that we’ve deployed the first steps of the integration between SonarCloud and GitLab. Right on time for Christmas! :christmas_tree:

What you can expect starting today:

The next steps that you can expect in the upcoming weeks are the following ones:

We hope you will enjoy this first step, and we are happy to hear your feedback about it on the “Get help > SonarCloud > gitlab” channel.

Enjoy!
The SonarCloud team :sonarcloud:

17 Likes

A post was split to a new topic: /api/alm_settings/create_gitlab Community Edition

As I already have an account linked to my GitHub Account how would I now link my GitLab Account so I can access our GitLab Projects?

If the route is through our organisation then that only presents the option to link it to GitHub Organisation.

3 Likes

When do we expect the Merge Request feature that was part of 8.1 to be part of SonarCloud?

This should become available in the upcoming weeks! :smiley:

I integrated Sonarcloud with Gitlab recently without being aware that it is still not possible to fail the pipeline based on the status of the quality gate. How is the development of this feature going? Where should I look for update on the development status of it?

You can watch MMF-1755. It’s identified in the short term roadmap.

Hi @Fabrice_Bellingard

In our company we’re looking into this SQ <-> Gitlab integration. Our main goal is to have reports on Merge Request about the code quality of the submitted branch.
I can see this is not available yet in the Cloud edition and I’m happy to wait for it (soon, right? :slight_smile: ) but it looks like that the integration you’ve developed so far is available only in the Cloud edition.
Is that so? Is there any way to use the integration with an on premise installation of both SQ (v 8.1) and GitLab?

We’re planning to adopt SQ as main analysis tool across all our teams and codebases and this step is a key one for the process.

Thanks,
Alessandro

Funnily enough after a day of tests as soon as I wrote you here I managed to get it up and running. :laughing:

Now I do have the SQ results in my Merge Request!

Thanks for your help,
Alessandro

When will the MR decorator thing announced in SonarQube 8.1 be available in SonarCloud?

Hi Lucas, as I mentioned a little earlier in this thread, this is in the short term roadmap. I just can’t give you a precise ETA, but be sure that this is coming.

Hello @WolfIntesys,
Have a look at How to block the merge of Merge Requests when SonarQube Quality Gate is failed, with GitLab
Hope it helps!

This feature is now live on SonarCloud!
Documentation is available at the bottom of the Analyze your repository with GitLab CI doc page on SonarCloud.

We’re now working on pushing results in the Merge Requests UI, this should come in a week or two.

And sooner than what I said in my previous post: SonarCloud now gives feedback in the Merge Requests UI in GitLab!

Whenever you push some code on a Merge Request, you can expect a comment similar to the following:

Hope you’ll like it. Enjoy!

1 Like

What is the proper way to use bitbucket and gitlab at the same time? Creating another sonarcloud organisation doesn’t work cause users email can be linked to only one of them.

Are you going to improve the integration so Sonar will comment on code, not just general comment in MR?

Hi Fabrice,

Is there any set-up guide regarding the feedback in the Merge Requests UI in GitLab feature?

Kind regards,
Stefanos.

Hi @Stefanos_Kyrikakis, I guess that there is nothing more to do than following the Get Started for GitLab. If you complete all the steps, then the feedback in the Merge Request UI should be automatically visible without having to configure anything else.

Thank you @Fabrice_Bellingard, our organisation is already connected with Bitbucket so I guess is the reason we can’t select in project/settings/sonar.pullrequest.provider other than GitHub, Azure DevOps and BitBucketCloud

Is there a way to provide a GitLab group ID and personal access token without connecting GitLab + Sonarcloud?

Our org is already connected to Sonarcloud through Azure.

Thanks!