ci: from drone to woodpecker
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Marvin Preuss 2022-03-29 11:47:04 +02:00
parent 8cb286ed5c
commit fee10a73b6
2 changed files with 26 additions and 117 deletions

View File

@ -1,117 +0,0 @@
---
kind: pipeline
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:
- name: tags
image: alpine/git
commands:
- git fetch --tags
- name: install-tools
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- *deps-command
- make install-tools
- name: lint
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make lint
depends_on:
- tags
- install-tools
- name: test
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make test
- make coverage
depends_on:
- install-tools
- tags
- lint
- name: build
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
commands:
- make build
depends_on:
- tags
- lint
- test
- install-tools
when:
event:
exclude:
- tag
- name: release
image: *golang-image
volumes:
- *gobin-volume
- *usr-volume
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- goreleaser release --rm-dist
depends_on:
- tags
- lint
- test
- install-tools
when:
event:
- tag
- name: coverage
image: plugins/codecov
settings:
token:
from_secret: codecov_token
files:
- coverage.xml
depends_on:
- test
- name: slack
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook_url
channel: xsfx-alerts
depends_on:
- build
- release
volumes:
- name: gobin
temp: {}
- name: usr
temp: {}

26
.woodpecker.yml Normal file
View File

@ -0,0 +1,26 @@
pipeline:
tags:
image: alpine/git
commands:
- git fetch --tags
lint:
image: golang:1.18
commands:
- make lint
test:
image: golang:1.18
commands:
- make test
build:
image: golang:1.18
commands:
- make build
release:
image: golang:1.18
commands:
- make release
secrets:
- gitea_token
when:
event:
- tag