Fakultas Ilmu Komputer UI

Commit 80047f48 authored by Wulan Mantiri's avatar Wulan Mantiri
Browse files

Integrate sonarqube

parent de52b3f1
...@@ -9,6 +9,7 @@ cache: ...@@ -9,6 +9,7 @@ cache:
stages: stages:
- test - test
- sonar-scanner
- build - build
test: test:
...@@ -18,6 +19,18 @@ test: ...@@ -18,6 +19,18 @@ test:
script: script:
- yarn test --coverage --watchAll=false --verbose --collectCoverageFrom="src/**/*.tsx" - yarn test --coverage --watchAll=false --verbose --collectCoverageFrom="src/**/*.tsx"
sonar-scanner:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
stage: sonar-scanner
script:
- sonar-scanner
-Dsonar.host.url=$SONARQUBE_URL
-Dsonar.login=$SONARQUBE_TOKEN
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.projectKey=$SONARQUBE_PROJECT_KEY
build: build:
stage: build stage: build
before_script: before_script:
......
# SonarScanner properties file
## Path to sources
sonar.sources=src
sonar.exclusions=src/**/*.ts,src/**/*.test.*
## Path to tests
sonar.javascript.lcov.reportPaths=coverage/lcov.info
## Source encoding
sonar.sourceEncoding=UTF-8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment