From 6bb5d25683eeb5aab524ad7501c37ac856dfe5f0 Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Sun, 28 Jan 2024 11:12:21 +0100 Subject: [PATCH] .drone.yml: add format & vuln check --- .drone.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.drone.yml b/.drone.yml index f111aa1..7500732 100644 --- a/.drone.yml +++ b/.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: {}