.drone.yml: add format & vuln check
This commit is contained in:
parent
2ca426ee4e
commit
6bb5d25683
1 changed files with 25 additions and 0 deletions
25
.drone.yml
25
.drone.yml
|
@ -2,6 +2,21 @@ kind: pipeline
|
|||
name: build
|
||||
|
||||
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
|
||||
image: thegeeklab/drone-docker-buildx
|
||||
privileged: true
|
||||
|
@ -23,6 +38,9 @@ steps:
|
|||
- main
|
||||
event:
|
||||
- push
|
||||
depends_on:
|
||||
- gofmt
|
||||
- vuln-check
|
||||
- name: docker-build
|
||||
image: thegeeklab/drone-docker-buildx
|
||||
privileged: true
|
||||
|
@ -46,6 +64,9 @@ steps:
|
|||
- main
|
||||
event:
|
||||
- push
|
||||
depends_on:
|
||||
- gofmt
|
||||
- vuln-check
|
||||
- name: bump tag in deployment-repo
|
||||
image: aaronriedel/kustomize-ci
|
||||
commands:
|
||||
|
@ -61,6 +82,8 @@ steps:
|
|||
- main
|
||||
event:
|
||||
- push
|
||||
depends_on:
|
||||
- docker
|
||||
- name: push new tag to deployment-repo
|
||||
image: appleboy/drone-git-push
|
||||
settings:
|
||||
|
@ -80,6 +103,8 @@ steps:
|
|||
- main
|
||||
event:
|
||||
- push
|
||||
depends_on:
|
||||
- bump tag in deployment-repo
|
||||
volumes:
|
||||
- name: deployment-repo
|
||||
temp: {}
|
||||
|
|
Loading…
Reference in a new issue