ci: using go mod managed tools in drone
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing

This commit is contained in:
Marvin Preuss 2022-01-07 20:21:30 +01:00
parent 75fa1f4f0a
commit 0f3bd2acf5

View File

@ -1,7 +1,20 @@
--- ---
kind: pipeline kind: pipeline
type: docker
name: default name: default
golang-image: &golang-image golang:1.17-alpine
gobin-volume: &gobin-volume
name: gobin
path: /go/bin
usr-volume: &usr-volume
name: usr
path: /usr
deps-command: &deps-command apk add build-base git
steps: steps:
- name: tags - name: tags
image: alpine/git image: alpine/git
@ -16,22 +29,45 @@ steps:
depends_on: depends_on:
- tags - tags
- name: install-tools
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- *deps-command
- make install-tools
- name: lint - name: lint
image: golangci/golangci-lint:v1.39.0 image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands: commands:
- make lint - make lint
depends_on: depends_on:
- tags
- submodules - submodules
- install-tools
- name: test - name: test
image: golang:latest image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands: commands:
- make test - make test
depends_on: depends_on:
- install-tools
- tags
- lint
- submodules - submodules
- name: build - name: build
image: goreleaser/goreleaser:v0.162.0 image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands: commands:
- make build - make build
depends_on: depends_on:
@ -43,7 +79,10 @@ steps:
- tag - tag
- name: release - name: release
image: goreleaser/goreleaser:v0.162.0 image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
environment: environment:
GITHUB_TOKEN: GITHUB_TOKEN:
from_secret: github_token from_secret: github_token
@ -55,3 +94,10 @@ steps:
when: when:
event: event:
- tag - tag
volumes:
- name: gobin
temp: {}
- name: usr
temp: {}