terraform-provider-gitea/.drone.yml
Tobias Trabelsi 021db20aa1
Some checks reported errors
continuous-integration/drone/push Build encountered an error
hard wip
2022-07-09 23:11:26 +02:00

66 lines
1.6 KiB
YAML

---
kind: pipeline
type: kubernetes
name: terraform-provider-gitea
platform:
os: linux
arch: amd64
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
when:
event:
- push
- pull_request
- tag
- name: backend
image: gitea/gitea:1.16.8
detach: true
commands:
- 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:
from_secret: GITEA_PASSWORD
- name: test
image: golang:1.18.3-alpine3.16
commands:
- "apk add --update --no-cache make build-base"
- "make test"
environment:
TF_ACC: 1
GITEA_BASE_URL: "http://localhost:3000"
GITEA_USERNAME: test
GITEA_PASSWORD:
from_secret: GITEA_PASSWORD
when:
event:
- push
- pull_request
- name: release
image: goreleaser/goreleaser
environment:
GITEA_TOKEN:
from_secret: gitea_token
GPG_PRIVATE_KEY:
from_secret: GPG_PRIVATE_KEY
GPG_FINGERPRINT:
from_secret: GPG_FINGERPRINT
GPG_PRIVATE_KEY_BASE64:
from_secret: GPG_PRIVATE_KEY_BASE64
commands:
- apk add gpg-agent
- gpg-agent --daemon --default-cache-ttl 7200
- echo $GPG_PRIVATE_KEY_BASE64 | base64 -d | gpg --import --batch --no-tty
- goreleaser release
resources:
limits:
cpu: 1000
memory: 1024MiB
when:
event:
- tag