From 9f3248641aa0f5cb463ba69cc7c19bcb13a7af55 Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Mon, 7 Feb 2022 15:34:59 +0100 Subject: [PATCH] ci: move from drone to woodpecker --- .drone.yml | 103 ------------------------------------------------ .woodpecker.yml | 34 ++++++++++++++++ 2 files changed, 34 insertions(+), 103 deletions(-) delete mode 100644 .drone.yml create mode 100644 .woodpecker.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 7b45ef6..0000000 --- a/.drone.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -kind: pipeline -type: docker -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: submodules - image: alpine/git - commands: - - git submodule init - - git submodule update - depends_on: - - 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 - - submodules - - install-tools - - - name: test - image: *golang-image - volumes: - - *gobin-volume - - *usr-volume - commands: - - make test - depends_on: - - install-tools - - tags - - lint - - submodules - - - name: build - image: *golang-image - volumes: - - *gobin-volume - - *usr-volume - commands: - - make build - depends_on: - - lint - - test - when: - event: - exclude: - - tag - - - name: release - image: *golang-image - volumes: - - *gobin-volume - - *usr-volume - environment: - GITHUB_TOKEN: - from_secret: github_token - commands: - - goreleaser release --rm-dist --parallelism=1 - depends_on: - - lint - - test - when: - event: - - tag - -volumes: - - name: gobin - temp: {} - - - name: usr - temp: {} diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..23e3c1d --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,34 @@ +pipeline: + tags: + image: alpine/git + commands: + - git fetch --tags + submodules: + image: alpine/git + commands: + - git submodule init + - git submodule update + when: + event: + - tag + lint: + image: golang:1.17 + commands: + - make lint + test: + image: golang:1.17 + commands: + - make test + build: + image: golang:1.17 + commands: + - make build + release: + image: golang:1.17 + commands: + - make release + secrets: + - github_token + when: + event: + - tag