fix(quality): pass Sonar URL and token via SONAR_* env (scanner defaults)
Made-with: Cursor
This commit is contained in:
@@ -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' }}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user