fix(ci): switch sonar secret names to SONARQUBE_HOST/TOKEN
Align central and quality workflows with repository secret names SONARQUBE_HOST and SONARQUBE_TOKEN and pass them to sonar-scanner via environment variables. Made-with: Cursor
This commit is contained in:
@@ -46,9 +46,9 @@ on:
|
||||
required: false
|
||||
|
||||
secrets:
|
||||
SONAR_HOST_URL:
|
||||
SONARQUBE_HOST:
|
||||
required: false
|
||||
SONAR_TOKEN:
|
||||
SONARQUBE_TOKEN:
|
||||
required: false
|
||||
|
||||
BETA_SERVER_HOST:
|
||||
@@ -102,8 +102,8 @@ jobs:
|
||||
with:
|
||||
wait_for_quality_gate: ${{ inputs.wait_for_quality_gate }}
|
||||
secrets:
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }}
|
||||
SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||
|
||||
# 🚀 DEPLOY
|
||||
deploy:
|
||||
|
||||
@@ -11,9 +11,9 @@ on:
|
||||
default: false
|
||||
|
||||
secrets:
|
||||
SONAR_HOST_URL:
|
||||
SONARQUBE_HOST:
|
||||
required: true
|
||||
SONAR_TOKEN:
|
||||
SONARQUBE_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
@@ -29,12 +29,13 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- 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.SONAR_HOST_URL }} \
|
||||
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.exclusions=node_modules/**,dist/**,coverage/** \
|
||||
-Dsonar.qualitygate.wait=${{ inputs.wait_for_quality_gate }}
|
||||
@@ -7,9 +7,9 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
SONAR_HOST_URL:
|
||||
SONARQUBE_HOST:
|
||||
required: true
|
||||
SONAR_TOKEN:
|
||||
SONARQUBE_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
@@ -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.SONAR_HOST_URL }} \
|
||||
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.exclusions=node_modules/**,dist/**,coverage/** \
|
||||
-Dsonar.qualitygate.wait=false
|
||||
Reference in New Issue
Block a user