diff --git a/.drone.yml b/.drone.yml index 4f30a59..ec2f16e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,6 @@ kind: pipeline +type: docker +name: default steps: - name: build @@ -6,3 +8,19 @@ steps: commands: - npm install - npm run build + + - name: sonar + image: sonarsource/sonar-scanner-cli:5 + commands: + - sonar-scanner -Dsonar.projectKey="$PROJECT_KEY" -Dsonar.login="$SONAR_TOKEN" -Dsonar.host.url=https://codefirst.iut.uca.fr/sonar + environment: + PROJECT_KEY: + from_secret: SONAR_PROJECT_KEY + SONAR_TOKEN: + from_secret: SONAR_TOKEN + depends_on: + - build + when: + branch: + - master + - ci/*