Update .gitea/workflows/sonar-scan.yaml
This commit is contained in:
@@ -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 #
|
||||||
# ------------------------------------------------------------------ #
|
# ------------------------------------------------------------------ #
|
||||||
|
|||||||
Reference in New Issue
Block a user