- Language Java
- Community Edition
- Version 7.9.1 (build 27448)
I use Quality Gate API to get the status of sonar run
doSonar() (<— runs sonar:sonar goal —>))
def qualitygate = getQualityGateStatus()
<-- uses API quality /api/qualitygates/project_status?projectKey=projectcoordinate—>
def email_body = getQualityGateMailBody() <-calls quality API again to form email body–>
sendEmail(null,‘Sonar Quality Gate Failed…!!’,email_body)
Problem is that first API call after sonar scan gives Quality Gate Status as false where as second call made to same qualitygate api to get and prepare email body retuen qulity gate passed why? and since first call was giving false positive emails are triggered.
Question is why first api call return wrong QG status where as second API call return right QG status?