gilde-ci-cd/tool-sonar7.gitlab-ci.yml
2022-01-21 10:44:13 +01:00

35 lines
1.2 KiB
YAML

.sonar-template:
stage: test
image: $MAVEN_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: "true"
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_BUILDBREAKER"
.sonar-template-gradle:
stage: test
image: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-sonar-tool:latest
variables:
SONAR_HOST_URL: http://sonar7.exxcellent.de/sonar7
SONAR_PROJECT_KEY: ""
SONAR_PROJECT_NAME: ""
SONAR_EXCLUSIONS: "**/target/**,**/src/test/**"
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_BUILDBREAKER"