From: Jérôme Benoit Date: Wed, 22 Apr 2026 21:58:39 +0000 (+0200) Subject: ci: retry SonarCloud branch rename for ui-common and cli only X-Git-Tag: cli@v4.5.0~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5291a222678504d4643750794b3c61fc653e89b4;p=e-mobility-charging-stations-simulator.git ci: retry SonarCloud branch rename for ui-common and cli only Root and webui already have main as their main branch. Target only the two remaining projects. Emit warning instead of silent success on failure. --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8622f698..32e39602 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,11 +32,10 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | + failed=0 for project in \ - e-mobility-charging-stations-simulator \ e-mobility-charging-stations-simulator-ui-common \ - e-mobility-charging-stations-simulator-cli \ - e-mobility-charging-stations-simulator-webui + e-mobility-charging-stations-simulator-cli do http_code=$(curl --silent --output /dev/null --write-out '%{http_code}' \ --request POST \ @@ -45,7 +44,13 @@ jobs: -H 'Content-Type: application/x-www-form-urlencoded' \ -d "project=${project}&name=main") echo "${project}: HTTP ${http_code}" + if [ "$http_code" != "204" ] && [ "$http_code" != "200" ]; then + failed=1 + fi done + if [ "$failed" = "1" ]; then + echo "::warning::Some SonarCloud branch renames failed. The SONAR_TOKEN may lack 'Administer project' permission." + fi build-ocpp-server: strategy: