.sonar-template-common: stage: test variables: SONAR_HOST_URL: http://sonar7.exxcellent.de/sonar7 SONAR_PROJECT_KEY: "" SONAR_PROJECT_NAME: "" SONAR_EXCLUSIONS: "**/target/**,**/src/test/**" SONAR_SKIP_BUILD_BREAKER: "true" SONAR_QUERY_MAX_ATTEMPTS_BUILD_BREAKER: "30" SONAR_QUERY_INTERVAL_BUILD_BREAKER: "10000" .sonar-template: extends: .sonar-template-common image: $MAVEN_IMAGE script: - mvn $MAVEN_CLI_OPTS test sonar:sonar "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" "-Dsonar.projectName=$SONAR_PROJECT_NAME" "-Dsonar.exclusions=$SONAR_EXCLUSIONS" "-Dsonar.buildbreaker.skip=$SONAR_SKIP_BUILD_BREAKER" "-Dsonar.buildbreaker.queryMaxAttempts=$SONAR_QUERY_MAX_ATTEMPTS_BUILD_BREAKER" "-Dsonar.buildbreaker.queryInterval=$SONAR_QUERY_INTERVAL_BUILD_BREAKER" .sonar-template-gradle: extends: .sonar-template-common image: $GRADLE_IMAGE script: - ./gradlew $GRADLE_OPTS sonarqube "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" "-Dsonar.projectName=$SONAR_PROJECT_NAME" "-Dsonar.exclusions=$SONAR_EXCLUSIONS" "-Dsonar.buildbreaker.skip=$SONAR_SKIP_BUILD_BREAKER" "-Dsonar.buildbreaker.queryMaxAttempts=$SONAR_QUERY_MAX_ATTEMPTS_BUILD_BREAKER" "-Dsonar.buildbreaker.queryInterval=$SONAR_QUERY_INTERVAL_BUILD_BREAKER"