add sonarqube to pipeline

pull/15/head
Alya Sirko 2022-09-15 23:56:44 +03:00
parent 9489180363
commit 8c837384eb
1 changed files with 9 additions and 7 deletions

View File

@ -2,18 +2,20 @@ kind: pipeline
type: exec type: exec
name: default name: default
platform:
os: linux
arch: amd64
steps: steps:
- name: test - name: Run Tests and Generate Coverage Report
commands: commands:
- coverage run -m pytest -q - coverage run -m pytest -q
- coverage xml - coverage xml
- name: bandit - sonar-scanner -Dsonar.projectKey=SelfPrivacy-REST-API -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN"
- name: Run Bandit Checks
commands: commands:
- bandit -ll -r selfprivacy_api - bandit -ll -r selfprivacy_api
- name: formatting
- name: Run Code Formatting Checks
commands: commands:
- black --check . - black --check .
node:
server: builder