From 84f373ecd73f14baac6636cc6a82b8b50d2d7a96 Mon Sep 17 00:00:00 2001 From: Topin2001 Date: Mon, 27 May 2024 14:03:20 +0200 Subject: [PATCH] Change sonarqube version for tests --- .github/workflows/java-continuous-integration.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/java-continuous-integration.yml b/.github/workflows/java-continuous-integration.yml index 04f02498..f2312fef 100644 --- a/.github/workflows/java-continuous-integration.yml +++ b/.github/workflows/java-continuous-integration.yml @@ -43,7 +43,7 @@ jobs: run: mvn -B clean package - name: Test cnes-report env: - SONARQUBE_VERSION: 9.9-community + SONARQUBE_VERSION: 10.5-community run: | version=$(cat pom.xml | grep ".*" | head -1 |awk -F'[><]' '{print $3}'); echo "Starting docker"; @@ -54,14 +54,13 @@ jobs: docker restart sonarqube_${SONARQUBE_VERSION}; echo "Waiting up to 5 minutes for SonarQube..."; counter=0; - limit=500; + limit=300; 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...";