From 8c837384eb5086e49d292c2d5ae10ce1dde48235 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Thu, 15 Sep 2022 23:56:44 +0300 Subject: [PATCH] add sonarqube to pipeline --- .drone.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5f89a9c..ce0f4fe 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,18 +2,20 @@ kind: pipeline type: exec name: default -platform: - os: linux - arch: amd64 - steps: -- name: test +- name: Run Tests and Generate Coverage Report commands: - coverage run -m pytest -q - 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: - bandit -ll -r selfprivacy_api -- name: formatting + +- name: Run Code Formatting Checks commands: - black --check . + +node: + server: builder