terraform-provider-gitea/.drone.yml

66 lines
1.6 KiB
YAML
Raw Permalink Normal View History

---
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-07-09 21:11:26 +00:00
- name: backend
image: gitea/gitea:1.16.8
detach: true
commands:
2022-07-09 21:11:26 +00:00
- su git
- gitea admin user create --username test --password $GITEA_PASSWORD --must-change-password false --admin --email test@mail.org
- /usr/bin/entrypoint /bin/s6-svscan /etc/s6
environment:
GITEA_PASSWORD:
2022-07-09 21:15:25 +00:00
from_secret: GITEA_TEST_PASSWORD
- 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-07-09 21:15:25 +00:00
- "make testacc"
2022-07-09 21:11:26 +00:00
environment:
TF_ACC: 1
GITEA_BASE_URL: "http://localhost:3000"
GITEA_USERNAME: test
GITEA_PASSWORD:
2022-07-09 21:15:25 +00:00
from_secret: GITEA_TEST_PASSWORD
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-13 19:12:54 +00:00
GPG_PRIVATE_KEY:
from_secret: GPG_PRIVATE_KEY
GPG_FINGERPRINT:
from_secret: GPG_FINGERPRINT
2022-06-21 21:12:49 +00:00
GPG_PRIVATE_KEY_BASE64:
from_secret: GPG_PRIVATE_KEY_BASE64
2022-06-06 20:49:06 +00:00
commands:
2022-06-13 19:12:54 +00:00
- apk add gpg-agent
- gpg-agent --daemon --default-cache-ttl 7200
2022-06-14 21:55:08 +00:00
- echo $GPG_PRIVATE_KEY_BASE64 | base64 -d | gpg --import --batch --no-tty
2022-06-06 20:49:06 +00:00
- goreleaser release
2022-06-09 19:04:52 +00:00
resources:
limits:
2022-06-12 13:36:58 +00:00
cpu: 1000
2022-06-09 19:04:52 +00:00
memory: 1024MiB
2022-06-06 20:49:06 +00:00
when:
2022-06-12 13:36:58 +00:00
event:
- tag