Merge branch '35-add-sonar-qube-to-project' into 'development'

feat:#35 added sonarqube

See merge request htwk-software/htwkalender!31
This commit is contained in:
Elmar Kresse
2024-06-14 11:42:13 +00:00
2 changed files with 26 additions and 0 deletions

View File

@ -18,6 +18,8 @@ stages:
- lint - lint
- build - build
- test - test
- sonarqube-check
- sonarqube-vulnerability-report
- oci-build - oci-build
- deploy - deploy
- deploy-dev # New stage for development deployment - deploy-dev # New stage for development deployment
@ -88,6 +90,28 @@ build-ical:
- data-manager/go.sum - data-manager/go.sum
- data-manager/go.mod - data-manager/go.mod
sonarqube-data-manager:
stage: sonarqube-check
image:
name: sonarsource/sonar-scanner-cli:5.0
entrypoint: [""]
variables:
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}"
paths:
- .sonar/cache
script:
- cd services/data-manager
- sonar-scanner
allow_failure: true
only:
- merge_requests
- master
- main
- develop
build-frontend: build-frontend:
image: node:lts image: node:lts
stage: build stage: build

View File

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