diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07e9b3e..c3264c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -192,13 +192,37 @@ preview-env-deploy: - preview-merge except: - main + - sonarqube_integration #====================================================== # Sonarqube integration #====================================================== +sonarqube-build: + stage: build + image: + name: uilicious/internal-alpine-base:latest + entrypoint: [""] + variables: + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + script: + - cp -r .vuepress/ vuepress/ + artifacts: + paths: + - vuepress/ + expire_in: 24 hour + allow_failure: true + only: + - sonarqube_integration + - merge_requests + - master + - main + - dev + + sonarqube-check: stage: sonarqube-check + needs: [sonarqube-build] image: name: sonarsource/sonar-scanner-cli:5.0 entrypoint: [""] @@ -213,6 +237,7 @@ sonarqube-check: - sonar-scanner allow_failure: true only: + - sonarqube_integration - merge_requests - master - main diff --git a/sonar-project.properties b/sonar-project.properties index 2611949..cc0fc9c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,2 +1,3 @@ sonar.projectKey=documentation_uilicious-docs-v3_AYsivnluAwe-aIyL34kw sonar.qualitygate.wait=true +# sonar.sources=.vuepress/