.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
|
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: {}
|
||||||
|
|
Loading…
Reference in a new issue