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
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: test
|
name: test-and-sonarqube
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: golang
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
- go build
|
- 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:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
@ -25,23 +32,6 @@ steps:
|
||||||
force: true
|
force: true
|
||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: id_rsa
|
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:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
|
Loading…
Add table
Reference in a new issue