Open asircar opened 6 years ago
Hi, Get me command line and full log please.
We are using GitLab and Hybris and so the job is triggered by the ant sonar task of Hybris with the all the properties being set. The only thing we need to know is from where is this setting being set which fails the build saying -
[image: Screen Shot 2018-08-28 at 2.42.33 PM.png]
We are not able to figure out from where the Open issues gate is set to fail at any open issue. We want it to respect the quality gate which we have set, which is set to fail when a critical or a blocker is found but as of now even if an info issue is found the stage breaks as we are not able to figure out from where the Open Issue gate is getting set.
Logs - [sonar:sonar] Quality gate status: ERROR [sonar:sonar] Open Issues: 2 > 0 [sonar:sonar] Reopened Issues : 0 [sonar:sonar] Report status=failed, desc=SonarQube reported QualityGate is error, with 1 error and 1 ok, 2 issues, with 1 major and 1 info
On Mon, Aug 27, 2018 at 2:59 AM Gabriel Allaigre notifications@github.com wrote:
Hi, Get me command line and full log please.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gabrie-allaigre/sonar-gitlab-plugin/issues/165#issuecomment-416073723, or mute the thread https://github.com/notifications/unsubscribe-auth/AKzWi9U_5jcAgLC8XVgBlsx0WDJFaf29ks5uUxNSgaJpZM4WKcaz .
@asircar Hi, I don't show image
Use branch plugin in Sonar ?
Yes, branch plugin is installed.
Have you a screenshot for Quality Gate in Sonarqube ?
As you can see, I have added the Open Issues in the Quality Gate to fail only when it is over 10, but still it is failing even when there is 1 open issue.
Your project use this quality gate ?
Yes
Ok, For Short-lived branch, quality gate is hard coded https://docs.sonarqube.org/display/SONAR/Short-lived+Branches For use your quality gate, you use Long-lived branch
Hello @gabrie-allaigre
I am new to CI and sonar qube.My organisation is expecting a successful PoC of complete gitlab CI pipeline to be run for all the projects. So I have done everything and just stuck in sonar qube .Integrated sonar qube with gitlab, set some metric for quality gate. Also when sonar scanner job completed then I can see the quality gate reports as pass or fail .
I am just doing a PoC in a sample project and in master branch . But can't understand what should be the commands to get the proper results both in quality gate and gitlab CI. I am confused what should be the error notification mode? commit-status or exit-code?
I am seeing various results like if quality gate is getting failed then in ci showing execution successful and job succeeded.and vice versa .
My team expect that if quality gate gets fail then ci will be failed,if quality gate success then ci also should show success.cant understand how to achieve these milestones. Give me proper commands to achieve these target Sorry ..query became so lengthy but I am completely confused.
Please help
stage("SonarQube Quality Gate") {
timeout(time: 1, unit: 'HOURS') {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline ABORTED due to Quality Gate Failure: ${qg.status}"
args.AbortPipeline();
return;
}
}
}
@Piyush041983 : use the above stage to mark the pipeline as FAILURE for QualityGate FAILURE
External build always fails with the error:
SonarQube analysis indicates that quality gate is failed. Open Issues is failed: Actual value 3 > 0
Even though the open issues has been explicitly set to fail only if its greater than 10 in the quality gate.