How to use Sonar Quality Gates with Gitlab-CI

1,906 views
Skip to first unread message

d.ko...@gmail.com

unread,
May 20, 2017, 9:52:21 AM5/20/17
to SonarQube
I have read your article and try the sonar waitForQualityGates in jenkins pipeline. I wish I can do the same in Gitlab-CI runners.

This is due to a bug we have with Jenkins and Jest running on a mesos plateform, this would help repair our build.

Is this possible ?

G. Ann Campbell

unread,
May 22, 2017, 10:45:42 AM5/22/17
to SonarQube, d.ko...@gmail.com
Hi,

First, please aware that the standard courtesies (Hi, Thanks, ...) are appreciated in this group.

Regarding your issue, if the bug truly lies in Jenkins+Jest, there's not likely much that can be done from this side. But certainly nothing can be done without more details. 


:-)
Ann

d.ko...@gmail.com

unread,
May 26, 2017, 9:28:28 AM5/26/17
to SonarQube, d.ko...@gmail.com
Hi Ann, thanks for reminding me this, I will try to behave.

I am trying to give up on jenkins and use gitlab-ci instead. I don't see an existing way to use the qualityGate from gitlab-ci but I can't be sure, do you have any information regarding it?

Regards,

Dimitri

G. Ann Campbell

unread,
May 26, 2017, 9:44:01 AM5/26/17
to d.ko...@gmail.com, SonarQube
Hi Dimitri,

I'm not aware of anything specifically for GitLab, but I wouldn't think anything is required. The standard plugin returns a non-zero response code at the end of an analysis that fails the quality gate.

BTW, despite the fact that we provided Jenkins pipeline functionality to facilitate this behavior, we still don't think it's a good idea because it means you loose clarity about why a build failed.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/04b6uOhNrfY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/206edb4c-8b25-4e89-93bf-4f89c83b5950%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

d.ko...@gmail.com

unread,
May 26, 2017, 7:59:24 PM5/26/17
to SonarQube, d.ko...@gmail.com
Thanks you for the link, I have already read this article and completely agreed with it. 

I still see a few case where the build breaker would be useful for my part.

What is the exact standard plugin you are speaking of ? 

As far as I have tested, the `sonar-scanner` doesn't wait for the quality gate response.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

G. Ann Campbell

unread,
May 30, 2017, 9:32:52 AM5/30/17
to Kopax Anderson, SonarQube
Hi Dimitri,

I'm talking about the build breaker plugin. I know you can set Jenkins pipelines up to wait for server-side analysis report processing. I thought the Build Breaker plugin made that happen automatically in Jenkins, but it has been a very long time since I looked at that (since its use is counter to what we recommend.


Ann



---
G. Ann Campbell | SonarSource
Product Manager
@GAnnCampbell

To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/2d40e092-b7b8-4f2b-a2a7-61541263ae39%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages