Skip to content

Commit

Permalink
Added time for SQ start and print of logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed May 27, 2024
1 parent 2dc14d5 commit 72074a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/java-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ jobs:
docker restart sonarqube_${SONARQUBE_VERSION};
echo "Waiting up to 5 minutes for SonarQube...";
counter=0;
limit=300;
limit=500;
status_sonar=$(curl -s "http://localhost:9000/api/system/status" | grep "\"status\":\"UP\"" > /dev/null; echo $?);
while [[ 0 -ne $status_sonar && $counter -le $limit ]]; do
sleep 1;
counter=$(( $counter + 1 ));
status_sonar=$(curl -s "http://localhost:9000/api/system/status" | grep "\"status\":\"UP\"" > /dev/null; echo $?);
done;
echo "SQ logs : $(docker logs sonarqube_${SONARQUBE_VERSION})";
echo "SonarQube is $([[ 0 -eq $status_sonar ]] && echo "up" || echo "down"), after $counter tries";
mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=admin -Dsonar.password=admin -Dsonar.organization=default-organization;
echo "Waiting for the SonarQube Compute Engine task to be completed...";
Expand Down

0 comments on commit 72074a0

Please sign in to comment.