This commit is contained in:
19
.drone.yml
19
.drone.yml
@@ -27,6 +27,25 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build
|
||||||
|
|
||||||
|
- name: code-analysis
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
image: sonarsource/sonar-scanner-cli:latest
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
test -f coverage/lcov.info
|
||||||
|
SONAR_ARGS="-Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.host.url=$SONAR_INSTANCE_URL -Dsonar.token=$SONAR_LOGIN_KEY -Dsonar.sources=src -Dsonar.tests=tests -Dsonar.test.inclusions=tests/**/*.{test,spec}.{ts,tsx,js,jsx} -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info -Dsonar.working.directory=/tmp/.scannerwork"
|
||||||
|
sonar-scanner $SONAR_ARGS
|
||||||
|
environment:
|
||||||
|
SONAR_USER_HOME: /tmp/.sonar
|
||||||
|
SONAR_PROJECT_KEY:
|
||||||
|
from_secret: sonar_project_key
|
||||||
|
SONAR_INSTANCE_URL:
|
||||||
|
from_secret: sonar_instance_url
|
||||||
|
SONAR_LOGIN_KEY:
|
||||||
|
from_secret: sonar_login_key
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
|||||||
Reference in New Issue
Block a user