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

How to fail GitLab CI Job if sonar scanner find a major issue? #174

Closed pedroIsai21 closed 5 years ago

pedroIsai21 commented 5 years ago

I am trying to fail a gitlab ci job if there are major issues. I'm not sure if the sonar.gitlab.max_major_issues_gate should work for this purpose.

Regards.

gabrie-allaigre commented 5 years ago

Hi, yes set value with 0

pedroIsai21 commented 5 years ago

Hi, yes set value with 0

Thanks, Works fine.

gabrie-allaigre commented 5 years ago

@Nymeria333 Hi, please open a new issue. By default, major, no fail. Set attribute -Dsonar.gitlab.max_major_issues_gate=0 to fail with major

spsankpal commented 4 years ago

is there a project example for failing this for major issue>0. Its not working for me, installed the attached plugin for 5.7 version. the sonar analysis is success for quality fate pass/ fail, and exceutes the deploy stage all the cases