2021-07-15 13:37:54 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: coopcloud.tech/abra
|
|
|
|
steps:
|
2021-07-15 21:00:33 +00:00
|
|
|
- name: make check
|
2021-09-07 05:21:52 +00:00
|
|
|
image: golang:1.17
|
2021-07-15 21:00:33 +00:00
|
|
|
commands:
|
|
|
|
- make check
|
|
|
|
|
2021-07-15 21:49:58 +00:00
|
|
|
- name: make static
|
2021-09-07 05:21:52 +00:00
|
|
|
image: golang:1.17
|
2021-09-07 05:16:08 +00:00
|
|
|
ignore: true # until we decide we all want this check
|
2021-07-15 21:49:58 +00:00
|
|
|
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
|
|
|
|
|
2021-07-15 13:37:54 +00:00
|
|
|
- name: make build
|
2021-09-07 05:21:52 +00:00
|
|
|
image: golang:1.17
|
2021-07-15 13:37:54 +00:00
|
|
|
commands:
|
|
|
|
- make build
|
2021-07-15 20:29:31 +00:00
|
|
|
|
2021-07-19 13:50:02 +00:00
|
|
|
- name: make test
|
2021-09-07 05:21:52 +00:00
|
|
|
image: golang:1.17
|
2021-07-19 13:50:02 +00:00
|
|
|
commands:
|
|
|
|
- make test
|
|
|
|
|
2021-07-15 20:29:31 +00:00
|
|
|
- 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:
|
2021-07-15 21:00:33 +00:00
|
|
|
- make check
|
2021-07-15 20:29:31 +00:00
|
|
|
- make build
|
2021-07-19 13:50:02 +00:00
|
|
|
- make test
|
2021-07-15 20:29:31 +00:00
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- failure
|
2021-09-06 12:10:08 +00:00
|
|
|
|
|
|
|
- name: fetch
|
|
|
|
image: docker:git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
depends_on:
|
|
|
|
- make check
|
|
|
|
- make build
|
|
|
|
- make test
|
2021-09-07 05:16:08 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
2021-09-06 12:10:08 +00:00
|
|
|
|
|
|
|
- name: release
|
2021-09-07 05:21:52 +00:00
|
|
|
image: golang:1.17
|
2021-09-06 12:10:08 +00:00
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
2021-09-07 07:04:06 +00:00
|
|
|
from_secret: goreleaser_gitea_token
|
2021-09-06 12:10:08 +00:00
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- curl -sL https://git.io/goreleaser | bash
|
|
|
|
depends_on:
|
|
|
|
- fetch
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
temp: {}
|