fix(quality): pass Sonar URL and token via SONAR_* env (scanner defaults)

Made-with: Cursor
This commit is contained in:
WDI-Ideas
2026-04-08 00:18:24 +05:30
parent b8f645b726
commit d604440af8
2 changed files with 8 additions and 4 deletions

View File

@@ -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' }}

View File

@@ -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