From 229c750a48025c690d03ab98149e11a6566e5fc6 Mon Sep 17 00:00:00 2001 From: Karina Schaeffler Date: Thu, 20 Jan 2022 16:40:40 +0100 Subject: [PATCH] feat(sonar-template): make skip build breaker configurable --- documentation/chapters/templates/tool-sonar7.adoc | 4 ++++ tool-sonar7.gitlab-ci.yml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/documentation/chapters/templates/tool-sonar7.adoc b/documentation/chapters/templates/tool-sonar7.adoc index b65ad5e..933f251 100644 --- a/documentation/chapters/templates/tool-sonar7.adoc +++ b/documentation/chapters/templates/tool-sonar7.adoc @@ -8,10 +8,14 @@ Mehr Details zu finden hier: https://gitlab.exxcellent.de/gilden/ci/exxcellent-s .Variables |=== |Name |Description | Default Value +|SONAR_HOST_URL | Url des Sonar Host Systems | "http://sonar7.exxcellent.de/sonar7" |SONAR_PROJECT_KEY | Der Sonar-Projekt-Key. | "" |SONAR_PROJECT_NAME | Der Sonar-Projekt-Name. | "" (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-template diff --git a/tool-sonar7.gitlab-ci.yml b/tool-sonar7.gitlab-ci.yml index 729f6ad..2ee397d 100644 --- a/tool-sonar7.gitlab-ci.yml +++ b/tool-sonar7.gitlab-ci.yml @@ -6,6 +6,7 @@ SONAR_PROJECT_KEY: "" SONAR_PROJECT_NAME: "" SONAR_EXCLUSIONS: "**/target/**,**/src/test/**" + SONAR_SKIP_BUILD_BREAKER: "true" script: - mvn $MAVEN_CLI_OPTS test sonar:sonar "-Dsonar.host.url=$SONAR_HOST_URL" @@ -13,4 +14,4 @@ "-Dsonar.projectKey=$SONAR_PROJECT_KEY" "-Dsonar.projectName=$SONAR_PROJECT_NAME" "-Dsonar.exclusions=$SONAR_EXCLUSIONS" - "-Dsonar.buildbreaker.skip=true" + "-Dsonar.buildbreaker.skip=$SONAR_SKIP_BUILDBREAKER"