Update .gitea/workflows/sonar-scan.yaml
Some checks failed
Build and Push to ACR / Build and Push (push) Successful in 5m1s
SonarQube Analysis / Build, Test & Analyse (push) Failing after 2m12s

This commit is contained in:
2026-04-13 13:17:25 +00:00
parent 7d828ae778
commit 07c7ee316b

View File

@@ -69,20 +69,23 @@ jobs:
# SONAR_HOST_URL e.g. http://sonarqube.example.com:9000 # # SONAR_HOST_URL e.g. http://sonarqube.example.com:9000 #
# SONAR_PROJECT_KEY e.g. spring-petclinic # # SONAR_PROJECT_KEY e.g. spring-petclinic #
# ------------------------------------------------------------------ # # ------------------------------------------------------------------ #
- name: Build, test and analyse with SonarQube - name: Build and test
run: |
./mvnw -B verify \
-Dtest='!PostgresIntegrationTests'
- name: SonarQube analysis
env: env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
run: | run: |
./mvnw -B verify sonar:sonar \ ./mvnw -B sonar:sonar \
-Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY }} \ -Dsonar.projectKey=${{ vars.SONAR_PROJECT_KEY }} \
-Dsonar.projectName="Spring PetClinic" \ -Dsonar.projectName="Spring PetClinic" \
-Dsonar.host.url="${SONAR_HOST_URL}" \ -Dsonar.host.url="${SONAR_HOST_URL}" \
-Dsonar.token="${SONAR_TOKEN}" \ -Dsonar.token="${SONAR_TOKEN}" \
-Dsonar.java.source=17 \ -Dsonar.java.source=17 \
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
-Dtest='!PostgresIntegrationTests,!MySqlIntegrationTests'
# ------------------------------------------------------------------ # # ------------------------------------------------------------------ #
# 5. Quality Gate — poll until the result is ready, fail if red # # 5. Quality Gate — poll until the result is ready, fail if red #
# ------------------------------------------------------------------ # # ------------------------------------------------------------------ #