-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
67 lines (61 loc) · 1.56 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
kind: pipeline
type: docker
name: default
trigger:
branch:
- main
services:
- name: drone
image: drone/drone:2.12.1
environment:
DRONE_GITEA_SERVER: "http://invalid"
DRONE_GITEA_CLIENT_ID: abcdefg
DRONE_GITEA_CLIENT_SECRET: hijklmnop
DRONE_LOGS_DEBUG: true
DRONE_LOGS_TEXT: true
DRONE_RPC_SECRET: qrstuvwxyz
DRONE_USER_CREATE: "username:drone,machine:false,admin:true,token:55241de264decc58e8a2b2d90728702c"
steps:
- name: drone wait
image: curlimages/curl:7.83.1
commands:
# Checks to see that localstack service is up and running
- until curl --silent --max-time 1 http://drone/healthz; do echo -n . && sleep 1; done
- name: run tests
image: golang:1.16
environment:
DRONE_SERVER: http://drone
DRONE_TOKEN: 55241de264decc58e8a2b2d90728702c
DRONE_USER: test
TF_ACC: 1
commands:
- go test -v ./...
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
when:
ref:
- refs/tags/v**
- name: goreleaser
image: goreleaser/goreleaser:v1.10.1
environment:
GITHUB_TOKEN:
from_secret: github_token
GPG_FINGERPRINT:
from_secret: gpg_fingerprint
GPG_PASSWORD:
from_secret: gpg_password
GPG_PRIVATE_KEY:
from_secret: gpg_private_key
commands:
- apk update
- apk add gpg-agent
- echo -e "$GPG_PRIVATE_KEY" | gpg --import --batch --no-tty
- echo "hello world" > temp.txt
- gpg --detach-sig --yes -v --output=/dev/null --pinentry-mode loopback --passphrase "$GPG_PASSWORD" temp.txt
- rm temp.txt
- goreleaser release
when:
ref:
- refs/tags/v**