2021-01-20 15:24:38 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2021-01-22 11:27:22 +01:00
|
|
|
- name: tags
|
2021-01-22 11:05:17 +01:00
|
|
|
image: alpine/git
|
2021-01-20 15:24:38 +01:00
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
2021-01-22 11:27:22 +01:00
|
|
|
|
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
|
|
|
- git submodule init
|
2021-01-22 11:57:43 +01:00
|
|
|
- git submodule update
|
2021-01-20 15:24:38 +01:00
|
|
|
|
2021-01-21 12:24:32 +01:00
|
|
|
- name: go-bindata
|
|
|
|
image: golang:latest
|
|
|
|
commands:
|
|
|
|
- (cd /tmp; go get -u github.com/go-bindata/go-bindata/...)
|
|
|
|
- go-bindata -pkg assets -o assets/bindata.go -nomemcopy /bin/true
|
|
|
|
|
2021-01-20 15:24:38 +01:00
|
|
|
- name: lint
|
|
|
|
image: golangci/golangci-lint:latest
|
|
|
|
commands:
|
|
|
|
- make lint
|
2021-01-21 12:24:32 +01:00
|
|
|
depends_on:
|
|
|
|
- go-bindata
|
2021-01-20 15:24:38 +01:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: golang:latest
|
|
|
|
commands:
|
2021-01-21 12:24:32 +01:00
|
|
|
- make test
|
|
|
|
depends_on:
|
|
|
|
- go-bindata
|
|
|
|
|
|
|
|
- name: clean
|
|
|
|
image: golang:latest
|
|
|
|
commands:
|
|
|
|
- make clean
|
|
|
|
- git checkout -- .
|
|
|
|
depends_on:
|
|
|
|
- lint
|
|
|
|
- test
|
2021-01-20 15:24:38 +01:00
|
|
|
|
|
|
|
- name: build
|
|
|
|
image: goreleaser/goreleaser:latest
|
|
|
|
commands:
|
2021-01-21 12:24:32 +01:00
|
|
|
- (cd /tmp; go get -u github.com/go-bindata/go-bindata/...)
|
2021-01-20 15:24:38 +01:00
|
|
|
- make build
|
|
|
|
depends_on:
|
2021-01-22 11:57:43 +01:00
|
|
|
- submodules
|
2021-01-21 12:24:32 +01:00
|
|
|
- clean
|
2021-01-25 09:18:46 +01:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2021-01-20 15:24:38 +01:00
|
|
|
|
|
|
|
- name: release
|
|
|
|
image: goreleaser/goreleaser:latest
|
|
|
|
environment:
|
2021-01-27 10:15:34 +01:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2021-01-20 15:24:38 +01:00
|
|
|
commands:
|
2021-01-21 12:24:32 +01:00
|
|
|
- (cd /tmp; go get -u github.com/go-bindata/go-bindata/...)
|
|
|
|
- goreleaser release --rm-dist --parallelism=1
|
2021-01-25 09:18:46 +01:00
|
|
|
depends_on:
|
|
|
|
- submodules
|
|
|
|
- clean
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|