Skip to content

Commit

Permalink
feat: add sonarcube ci stage
Browse files Browse the repository at this point in the history
  • Loading branch information
vermorag committed Aug 13, 2024
1 parent 34bdc87 commit 7d3377e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ image:
stages:
- sync
- build
- test
- upload
- deploy

Expand Down Expand Up @@ -134,3 +135,23 @@ github:
- git fetch github $CI_COMMIT_REF_NAME
- git branch -u github/$CI_COMMIT_REF_NAME
- git push

sonarqube-check:
image:
name: docker-proxy.cdek.ru/sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
GIT_DEPTH: "0"
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
tags:
- docker
stage: test
script:
- sonar-scanner
allow_failure: true
only:
- main
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.projectKey=cms_wordpress
sonar.qualitygate.wait=true

0 comments on commit 7d3377e

Please sign in to comment.