another sonarqube attempt

This commit is contained in:
BroodjeAap 2023-04-08 16:39:25 +00:00
parent bea4c67cd6
commit a2a2c2d5d5

View file

@ -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