- Using SonarQube v3.3
-
What we are trying to achieve?
We are using Travis to run multiple checks and scans including SonarQube. After starting the scan we immediately make a curl call to retrieve the quality gate (see below).
- stage: scan
name: "gradle sonarscan (jdk11)"
jdk: openjdk11
script:
- ./gradlew buildDists sonarqube -Dsonar.login=$SONAR_LOGIN
- curl -s https://sonarcloud.io/api/project_badges/quality_gate?project=opendap-olfs | grep "QUALITY GATE PASS"
When we run the sonar scan we have noticed on SonarCloud.io the analysis will continue running after Travis has completed the command and made the curl call.
This means Travis is retrieving the previous analysis result instead of the current analysis result.
So what we are asking: Is there a way to check if an analysis is done and/or running using a curl call?
-
What have we done to achieve this?
We have looked for documentation on this matter and found none. We have also tried to use a curl call to search for the “Analysis in progress. This could take up to 30 minutes” banner that sometimes shows up but had no success on this.
Any and all help on this matter will be appreciated.