Skip to content

Commit

Permalink
cnescatlab#44 : SonarQube CNES 3.1.0 doesn't contain CNES quality pro…
Browse files Browse the repository at this point in the history
…file and quality gate
  • Loading branch information
Turiok committed Jan 12, 2024
1 parent 6ba333a commit f5adaa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion scripts/functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,21 @@ log()
wait_sonarqube_up()
{
sonar_status="DOWN"
http_code=0
log $INFO "initiating connection with SonarQube."
sleep 15
while [ "$http_code" -ne 200 ]
do
sleep 5
http_code=$(curl -i -su "admin:$SONARQUBE_ADMIN_PASSWORD" "${SONARQUBE_URL}" \
| sed -n -r -e 's/^HTTP\/.+ ([0-9]+)/\1/p')
http_code=${http_code:0:3} # remove \n
log $INFO "SonarQube HTTP code is ${http_code}, expecting it to be 200."
done
log $INFO "SonarQube HTTP code is ${http_code}"
while [ "${sonar_status}" != "UP" ]
do
sleep 20
sleep 5
sonar_status=$(curl -s -X GET "${SONARQUBE_URL}/api/system/status" | jq -r '.status')
log $INFO "SonarQube is ${sonar_status}, expecting it to be UP."
done
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cnes_sonarqube.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_check_plugins(self):
("Kotlin Code Quality and Security","2.12.0 (build 1956)"),
("PHP Code Quality and Security","3.27.1 (build 9352)"),
("PMD", "3.4.0"),
("Python Code Quality and Security","3.24 (build 10784)"),
("Python Code Quality and Security", "3.24.1 (build 11916)"),
("Ruby Code Quality and Security","1.11.0 (build 3905)"),
("Scala Code Quality and Security","1.11.0 (build 3905)"),
("ShellCheck Analyzer","2.5.0"),
Expand Down

0 comments on commit f5adaa1

Please sign in to comment.