add sonarqube config

This commit is contained in:
Christoph Schabert 2024-12-09 15:27:35 +01:00
parent 60ace01151
commit e5c4fd7d3c
2 changed files with 21 additions and 0 deletions

19
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,19 @@
sonarqube:
stage: test
image:
name: sonarsource/sonar-scanner-cli:11.1
entrypoint:
- ''
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
GIT_DEPTH: '0'
cache:
key: "${CI_JOB_NAME}"
paths:
- ".sonar/cache"
script:
- sonar-scanner
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
- if: "$CI_COMMIT_BRANCH =~ /^release/"

2
sonar-project.properties Normal file
View File

@ -0,0 +1,2 @@
sonar.projectKey=common-ui
sonar.qualitygate.wait=true