go-watch/.drone.yaml

39 lines
No EOL
1,012 B
YAML

kind: pipeline
type: kubernetes
name: test-and-sonarqube
steps:
- name: test
image: golang
commands:
- go build
- go test -v github.com/broodjeaap/go-watch/web -coverprofile=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/ -Dsonar.sources=. -Dsonar.exclusions=**/*.js,**/*_test.go -Dsonar.tests=. -Dsonar.test.inclusions=**/*_test.go -Dsonar.go.coverage.reportPaths=/drone/src/cov.out
SONAR_TOKEN:
from_secret: sonarqube_token
trigger:
branch:
- master
event:
- push
---
kind: pipeline
type: kubernetes
name: github-push
steps:
- name: push commit
image: appleboy/drone-git-push:0.2.0-linux-amd64
settings:
branch: master
remote: git@github.com:broodjeaap/go-watch.git
force: true
ssh_key:
from_secret: id_rsa
trigger:
branch:
- master
event:
- push