From d604440af823c664b2c828a3d6a2cc5d23b79141 Mon Sep 17 00:00:00 2001 From: WDI-Ideas Date: Wed, 8 Apr 2026 00:18:24 +0530 Subject: [PATCH] fix(quality): pass Sonar URL and token via SONAR_* env (scanner defaults) Made-with: Cursor --- .gitea/workflows/quality.yml | 7 +++++-- .gitea/workflows/qualitytest.yml | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml index d983132..73675ed 100644 --- a/.gitea/workflows/quality.yml +++ b/.gitea/workflows/quality.yml @@ -29,13 +29,16 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 + # Pass URL/token via env (scanner reads SONAR_HOST_URL / SONAR_TOKEN). Keeps secrets out of + # the rewritten run script and avoids WDIPL-Runner still resolving wrong secret names in -D lines. - name: Run SonarQube Scan + env: + SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} + SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} run: | sonar-scanner \ -Dsonar.projectKey=${{ inputs.project_key }} \ -Dsonar.projectName=${{ inputs.project_key }} \ -Dsonar.sources=. \ - -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \ - -Dsonar.token=${{ secrets.SONARQUBE_TOKEN }} \ -Dsonar.exclusions=node_modules/**,dist/**,coverage/** \ -Dsonar.qualitygate.wait=${{ inputs.wait_for_quality_gate == true || inputs.wait_for_quality_gate == 'true' }} \ No newline at end of file diff --git a/.gitea/workflows/qualitytest.yml b/.gitea/workflows/qualitytest.yml index a1ca2b9..056bfd5 100644 --- a/.gitea/workflows/qualitytest.yml +++ b/.gitea/workflows/qualitytest.yml @@ -24,12 +24,13 @@ jobs: - uses: actions/checkout@v3 - name: Run SonarQube Scan (with Quality Gate) + env: + SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} + SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} run: | sonar-scanner \ -Dsonar.projectKey=${{ inputs.project_key }} \ -Dsonar.projectName=${{ inputs.project_key }} \ -Dsonar.sources=. \ - -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \ - -Dsonar.token=${{ secrets.SONARQUBE_TOKEN }} \ -Dsonar.exclusions=node_modules/**,dist/**,coverage/** \ -Dsonar.qualitygate.wait=false \ No newline at end of file