75 lines
1.5 KiB
YAML
75 lines
1.5 KiB
YAML
---
|
|
kind: pipeline
|
|
name: coopcloud.tech/abra
|
|
steps:
|
|
- name: make check
|
|
image: golang:1.17
|
|
commands:
|
|
- make check
|
|
|
|
- name: make static
|
|
image: golang:1.17
|
|
ignore: true # until we decide we all want this check
|
|
environment:
|
|
STATIC_CHECK_URL: honnef.co/go/tools/cmd/staticcheck
|
|
STATIC_CHECK_VERSION: v0.2.0
|
|
commands:
|
|
- go install $STATIC_CHECK_URL@$STATIC_CHECK_VERSION
|
|
- make static
|
|
|
|
- name: make build
|
|
image: golang:1.17
|
|
commands:
|
|
- make build
|
|
|
|
- name: make test
|
|
image: golang:1.17
|
|
commands:
|
|
- make test
|
|
|
|
- name: notify on failure
|
|
image: plugins/matrix
|
|
settings:
|
|
homeserver: https://matrix.autonomic.zone
|
|
roomid: "IFazIpLtxiScqbHqoa:autonomic.zone"
|
|
userid: "@autono-bot:autonomic.zone"
|
|
accesstoken:
|
|
from_secret: autono_bot_access_token
|
|
depends_on:
|
|
- make check
|
|
- make build
|
|
- make test
|
|
when:
|
|
status:
|
|
- failure
|
|
|
|
- name: fetch
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
depends_on:
|
|
- make check
|
|
- make build
|
|
- make test
|
|
when:
|
|
event: tag
|
|
|
|
- name: release
|
|
image: golang:1.17
|
|
environment:
|
|
GITEA_TOKEN:
|
|
from_secret: goreleaser_gitea_token
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- curl -sL https://git.io/goreleaser | bash
|
|
depends_on:
|
|
- fetch
|
|
when:
|
|
event: tag
|
|
|
|
volumes:
|
|
- name: deps
|
|
temp: {}
|