2022-06-04 15:17:08 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: kubernetes
|
|
|
|
name: terraform-provider-gitea
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
steps:
|
2022-06-06 20:49:06 +00:00
|
|
|
- name: fetch
|
|
|
|
image: docker:git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
2022-06-04 15:17:08 +00:00
|
|
|
- name: init
|
|
|
|
image: golang:1.18.3-alpine3.16
|
|
|
|
commands:
|
|
|
|
- "go mod download"
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- name: build
|
|
|
|
image: golang:1.18.3-alpine3.16
|
|
|
|
commands:
|
2022-06-04 15:19:50 +00:00
|
|
|
- "apk add --update --no-cache make"
|
2022-06-04 15:17:08 +00:00
|
|
|
- "make build"
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- name: test
|
|
|
|
image: golang:1.18.3-alpine3.16
|
|
|
|
commands:
|
2022-06-04 15:22:51 +00:00
|
|
|
- "apk add --update --no-cache make build-base"
|
2022-06-04 15:17:08 +00:00
|
|
|
- "make test"
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
2022-06-06 20:49:06 +00:00
|
|
|
- pull_request
|
|
|
|
- name: release
|
|
|
|
image: goreleaser/goreleaser
|
|
|
|
environment:
|
2022-06-06 20:50:14 +00:00
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: gitea_token
|
2022-06-06 20:49:06 +00:00
|
|
|
commands:
|
|
|
|
- goreleaser release
|
|
|
|
when:
|
|
|
|
event: tag
|