another sonarqube attempt
This commit is contained in:
parent
bea4c67cd6
commit
a2a2c2d5d5
1 changed files with 9 additions and 19 deletions
28
.drone.yaml
28
.drone.yaml
|
@ -1,12 +1,19 @@
|
|||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: test
|
||||
name: test-and-sonarqube
|
||||
steps:
|
||||
- name: test
|
||||
image: golang
|
||||
commands:
|
||||
- go build
|
||||
- go test -v github.com/broodjeaap/go-watch/web
|
||||
- go test -v github.com/broodjeaap/go-watch/web -coverprofile=bin/cov.out
|
||||
- name: sonarqube
|
||||
image: sonarsource/sonar-scanner-cli
|
||||
environment:
|
||||
SONAR_HOST_URL: https://sonarqube.broodjeaap.net
|
||||
SONAR_SCANNER_OPTS: -Dsonar.projectKey=go-watch -Dsonar.projectBaseDir=/drone/src/.git/ -Dsonar.sources=. -Dsonar.exclusions=**/*_test.go -Dsonar.tests=. -Dsonar.test.inclusions=**/*_test.go -Dsonar.go.coverage.reportPaths=bin/cov.out
|
||||
SONAR_LOGIN:
|
||||
from_secret: sonarqube_token
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
|
@ -25,23 +32,6 @@ steps:
|
|||
force: true
|
||||
ssh_key:
|
||||
from_secret: id_rsa
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: sonarqube
|
||||
steps:
|
||||
- name: sonar scanner
|
||||
image: sonarsource/sonar-scanner-cli
|
||||
environment:
|
||||
SONAR_HOST_URL: https://sonarqube.broodjeaap.net
|
||||
SONAR_SCANNER_OPTS: -Dsonar.projectKey=go-watch -Dsonar.projectBaseDir=/drone/src/.git/
|
||||
SONAR_LOGIN:
|
||||
from_secret: sonarqube_token
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
|
|
Loading…
Add table
Reference in a new issue