feat(tool-sonar): activates Build-Breaker (by default) and make properties configurable
This commit is contained in:
parent
f93b0f55db
commit
2f5b771908
@ -15,6 +15,8 @@ Mehr Details zu finden hier: https://gitlab.exxcellent.de/gilden/ci/exxcellent-s
|
||||
(Es wird dann standardmäßig der Maven project.name verwendet)
|
||||
|SONAR_EXCLUSIONS | Files die Sonar ausgeschlossen werden |"**/target/**,**/src/test/**"
|
||||
|SONAR_SKIP_BUILD_BREAKER | Definiert ob der Build Breaker übersprungen werden soll | "true"
|
||||
|SONAR_BUILDBREAKER_QUERYMAXATTEMPTS | Maximale Anzahl an Anfragen, um den Sonar-Report zu erhalten | "30"
|
||||
|SONAR_BUILDBREAKER_QUERYINTERVAL | Intervallzeit in Millisekunden zwischen 2 Anfragen | "10000"
|
||||
|
||||
|===
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
SONAR_PROJECT_NAME: ""
|
||||
SONAR_EXCLUSIONS: "**/target/**,**/src/test/**"
|
||||
SONAR_SKIP_BUILD_BREAKER: "true"
|
||||
SONAR_BUILDBREAKER_QUERYMAXATTEMPTS: "30"
|
||||
SONAR_BUILDBREAKER_QUERYINTERVAL: "10000"
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS test sonar:sonar
|
||||
"-Dsonar.host.url=$SONAR_HOST_URL"
|
||||
@ -15,15 +17,20 @@
|
||||
"-Dsonar.projectName=$SONAR_PROJECT_NAME"
|
||||
"-Dsonar.exclusions=$SONAR_EXCLUSIONS"
|
||||
"-Dsonar.buildbreaker.skip=$SONAR_SKIP_BUILDBREAKER"
|
||||
"-Dsonar.buildbreaker.queryMaxAttempts=${SONAR_BUILDBREAKER_QUERYMAXATTEMPTS}"
|
||||
"-Dsonar.buildbreaker.queryInterval=${SONAR_BUILDBREAKER_QUERYINTERVAL}"
|
||||
|
||||
.sonar-template-gradle:
|
||||
stage: test
|
||||
image: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-sonar-tool:latest
|
||||
image: $GRADLE_IMAGE
|
||||
variables:
|
||||
SONAR_HOST_URL: http://sonar7.exxcellent.de/sonar7
|
||||
SONAR_PROJECT_KEY: ""
|
||||
SONAR_PROJECT_NAME: ""
|
||||
SONAR_EXCLUSIONS: "**/target/**,**/src/test/**"
|
||||
SONAR_SKIP_BUILD_BREAKER: "false"
|
||||
SONAR_BUILDBREAKER_QUERYMAXATTEMPTS: "30"
|
||||
SONAR_BUILDBREAKER_QUERYINTERVAL: "10000"
|
||||
script:
|
||||
- ./gradlew $GRADLE_OPTS sonarqube
|
||||
"-Dsonar.host.url=$SONAR_HOST_URL"
|
||||
@ -32,3 +39,6 @@
|
||||
"-Dsonar.projectName=$SONAR_PROJECT_NAME"
|
||||
"-Dsonar.exclusions=$SONAR_EXCLUSIONS"
|
||||
"-Dsonar.buildbreaker.skip=$SONAR_SKIP_BUILDBREAKER"
|
||||
"-Dsonar.buildbreaker.queryMaxAttempts=${SONAR_BUILDBREAKER_QUERYMAXATTEMPTS}"
|
||||
"-Dsonar.buildbreaker.queryInterval=${SONAR_BUILDBREAKER_QUERYINTERVAL}"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user