mirror of
https://github.com/jung-geun/policy-routing.git
synced 2025-12-20 02:34:39 +09:00
GitLab CI 구성 업데이트: 빌드 단계에 SonarQube 분석 추가 및 관련 설정 파일 생성
This commit is contained in:
26
.gitlab/ci/sonarqube.gitlab-ci.yml
Normal file
26
.gitlab/ci/sonarqube.gitlab-ci.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
image:
|
||||
name: sonarsource/sonar-scanner-cli:11
|
||||
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
|
||||
|
||||
build-sonar:
|
||||
stage: build-sonar
|
||||
|
||||
cache:
|
||||
policy: pull-push
|
||||
key: "sonar-cache-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- "${SONAR_USER_HOME}/cache"
|
||||
- sonar-scanner/
|
||||
|
||||
script:
|
||||
- sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}"
|
||||
allow_failure: true
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
- if: $CI_COMMIT_BRANCH == 'master'
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
- if: $CI_COMMIT_BRANCH == 'develop'
|
||||
Reference in New Issue
Block a user