.drone.yml: add format & vuln check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Tom Neuber 2024-01-28 11:12:21 +01:00
parent bd2962ef77
commit 41e1637dc3
Signed by: tom
GPG key ID: F17EFE4272D89FF6

View file

@ -2,6 +2,21 @@ kind: pipeline
name: build name: build
steps: steps:
- name: gofmt
image: golang:1.21
commands:
- gofmt -l -s .
when:
event:
- push
- name: vuln-check
image: golang:1.21
commands:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
when:
event:
- push
- name: docker - name: docker
image: thegeeklab/drone-docker-buildx image: thegeeklab/drone-docker-buildx
privileged: true privileged: true
@ -23,6 +38,9 @@ steps:
- main - main
event: event:
- push - push
depends_on:
- gofmt
- vuln-check
- name: docker-build - name: docker-build
image: thegeeklab/drone-docker-buildx image: thegeeklab/drone-docker-buildx
privileged: true privileged: true
@ -46,6 +64,9 @@ steps:
- main - main
event: event:
- push - push
depends_on:
- gofmt
- vuln-check
- name: bump tag in deployment-repo - name: bump tag in deployment-repo
image: aaronriedel/kustomize-ci image: aaronriedel/kustomize-ci
commands: commands:
@ -61,6 +82,8 @@ steps:
- main - main
event: event:
- push - push
depends_on:
- docker
- name: push new tag to deployment-repo - name: push new tag to deployment-repo
image: appleboy/drone-git-push image: appleboy/drone-git-push
settings: settings:
@ -80,6 +103,8 @@ steps:
- main - main
event: event:
- push - push
depends_on:
- bump tag in deployment-repo
volumes: volumes:
- name: deployment-repo - name: deployment-repo
temp: {} temp: {}