Issue #111: add sonarqube analysis

- add sonar-scanner dev dependency
  - add sonar-scanner job in ci configuration
This commit is contained in:
Luca Ponzanelli 2020-05-07 16:17:03 +02:00
parent 26d1f22c04
commit 873a136c68
3 changed files with 629 additions and 12 deletions

View file

@ -3,6 +3,7 @@ image: node:latest
stages: stages:
- build - build
- test - test
- code_quality
- deploy - deploy
cache: cache:
@ -24,6 +25,14 @@ testing_testing:
- cd smart-hut - cd smart-hut
- yarn test - yarn test
sonar-scanner:
stage: code_quality
only:
- dev
script:
- cd smart-hut
- yarn sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.projectName=$CI_PROJECT_PATH_SLUG -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.exclusion=cypress -Dsonar.sources=src -Dsonar.javascript.file.suffixes=.js,.jsx -Dsonar.sourceEncoding=UTF-8 -Dsonar.scm.disabled=True
smartHut_deploy: smartHut_deploy:
stage: deploy stage: deploy
tags: tags:

View file

@ -53,6 +53,7 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"prettier": "2.0.1" "prettier": "2.0.1",
"sonarqube-scanner": "^2.6.0"
} }
} }

File diff suppressed because it is too large Load diff