From 5d9a0ece1da57093a62e98fcc99bad3ff1476122 Mon Sep 17 00:00:00 2001 From: Lennart Yaguboglu Date: Wed, 25 Feb 2026 12:38:57 +0100 Subject: [PATCH] update sonarqube ci --- .gitlab-ci.yml | 20 ++++++++++++-------- sonar-project.properties | 2 ++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 sonar-project.properties diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df524cc..a8d3542 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,21 +59,25 @@ lint-ical: sonarqube-data-manager: stage: sonarqube-check tags: - - imn + - fdit image: - name: sonarsource/sonar-scanner-cli:5.0 + name: sonarsource/sonar-scanner-cli:11 entrypoint: - '' + variables: - SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" - GIT_DEPTH: '0' + SONAR_USER_HOME: '${CI_PROJECT_DIR}/.sonar' # Defines the location of the analysis task cache + GIT_DEPTH: '0' # Tells git to fetch all the branches of the project, required by the analysis task + cache: - key: "${CI_JOB_NAME}" + policy: pull-push + key: 'sonar-cache-$CI_COMMIT_REF_SLUG' paths: - - ".sonar/cache" + - '${SONAR_USER_HOME}/cache' + - sonar-scanner/ + script: - - cd services/data-manager - - sonar-scanner + - sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}" allow_failure: true rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..a0ad568 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectKey=HTWKalender +sonar.qualitygate.wait=true