If you can’t use the newest version that supposedly eliminates this problem by doing things very differently (I haven’t examined the details of the new version, we are only at 7.9.2 and will likely be there for a long time), then I’d suggest you do what I implemented in our builds. I simply added Jenkins pipeline code that waits for the background task to complete, and then uses the REST api to look at the “coverage after merge” value, and compare that to the threshold required in the quality gate. If it’s below the threshold, I fail the build. This means that the scan itself won’t show as failed, but at least I don’t let the build succeed in this case.
Hi Folks ,
My sonar Quality Gate is failing due to addition of three py scripts and if I remove those 3 scripts QG is passing and In the logs Its showing like (Injecting SonarQube environment variables using the configuration: axtria-sonarqube
[Pipeline] {
[Pipeline] timeout
Timeout set to expire in 5 min 0 sec
[Pipeline] {
[Pipeline] waitForQualityGate
Checking status of SonarQube task ‘AYoIuYv-WBeAGdbfPm5u’ on server ‘axtria-sonarqube’
SonarQube task ‘AYoIuYv-WBeAGdbfPm5u’ status is ‘IN_PROGRESS’
The incoming webhook matched the configured webhook secret
SonarQube task ‘AYoIuYv-WBeAGdbfPm5u’ status is ‘SUCCESS’
SonarQube task ‘AYoIuYv-WBeAGdbfPm5u’ completed. Quality gate is ‘ERROR’
[Pipeline] }) . I’m not sure why code coverage is reducing from 68 % to directly 38 % after addition of three scripts which is processing aws secrest paramterization.
You’ve resurrected an old thread for an unrelated question. Please create a new thread with all your details.
Ann