diff --git a/tool-sonar7.gitlab-ci.yml b/tool-sonar7.gitlab-ci.yml index 59967bc..da2facc 100644 --- a/tool-sonar7.gitlab-ci.yml +++ b/tool-sonar7.gitlab-ci.yml @@ -1,6 +1,5 @@ -.sonar-template: +.sonar-template-common: stage: test - image: $MAVEN_IMAGE variables: SONAR_HOST_URL: http://sonar7.exxcellent.de/sonar7 SONAR_PROJECT_KEY: "" @@ -9,6 +8,10 @@ SONAR_SKIP_BUILD_BREAKER: "true" SONAR_BUILDBREAKER_QUERYMAXATTEMPTS: "30" SONAR_BUILDBREAKER_QUERYINTERVAL: "10000" + +.sonar-template: + extends: .sonar-template-common + image: $MAVEN_IMAGE script: - mvn $MAVEN_CLI_OPTS test sonar:sonar "-Dsonar.host.url=$SONAR_HOST_URL" @@ -21,16 +24,8 @@ "-Dsonar.buildbreaker.queryInterval=${SONAR_BUILDBREAKER_QUERYINTERVAL}" .sonar-template-gradle: - stage: test + extends: .sonar-template-common 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" @@ -41,4 +36,3 @@ "-Dsonar.buildbreaker.skip=$SONAR_SKIP_BUILDBREAKER" "-Dsonar.buildbreaker.queryMaxAttempts=${SONAR_BUILDBREAKER_QUERYMAXATTEMPTS}" "-Dsonar.buildbreaker.queryInterval=${SONAR_BUILDBREAKER_QUERYINTERVAL}" -