-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
153 lines (134 loc) · 2.72 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
kind: pipeline
type: docker
name: default
steps:
- name: go-test
image: golang:1.13
depends_on: ["clone"]
volumes:
- name: gomod
path: /go/pkg/mod
- name: gocache
path: /root/.cache/go-build
environment:
# EM_ are used by ExchangeManager test suite
EM_COINBASE_TEST_KEY:
from_secret: EM_COINBASE_TEST_KEY
EM_COINBASE_TEST_PASSPHRASE:
from_secret: EM_COINBASE_TEST_PASSPHRASE
EM_COINBASE_TEST_SECRET:
from_secret: EM_COINBASE_TEST_SECRET
EM_GEMINI_TEST_KEY:
from_secret: EM_GEMINI_TEST_KEY
EM_GEMINI_TEST_SECRET:
from_secret: EM_GEMINI_TEST_SECRET
commands:
- make ci
- name: maker-test
image: python:stretch
depends_on: ["clone"]
environment:
REDIS_HOST: redis
ASSET_CONFIG_FILE: maker/config.json
commands:
- cd services/maker
- pip install -r requirements.txt
- python -m pytest .
- name: hedger-test
image: python:stretch
depends_on: ["clone"]
environment:
REDIS_HOST: redis
commands:
- cd services/hedger
- pip install -r requirements.txt
- python -m pytest .
- name: lint
image: golangci/golangci-lint:v1.21.0
depends_on: ["clone"]
volumes:
- name: gomod
path: /go/pkg/mod
- name: gocache
path: /root/.cache/go-build
- name: golint
path: /root/.cache/golangci-lint
commands:
- make lint
services:
- name: 0x-snapshot
pull: always
image: gcr.io/zaidan-eth-net/0x-snapshot:v3
- name: redis
image: redis
volumes:
- name: gomod
host:
path: /tmp/drone/zaidan/gomod
- name: gocache
host:
path: /tmp/drone/zaidan/gocache
- name: golint
host:
path: /tmp/drone/zaidan/golint
trigger:
event:
- pull_request
---
kind: pipeline
type: docker
name: release
steps:
- name: docker-push
image: docker
priviliged: true
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
GCLOUD_JSON_KEY:
from_secret: gcloud_json_key
DOCKER_TAG: ${DRONE_TAG}
commands:
- apk add make
- echo $GCLOUD_JSON_KEY | docker login -u _json_key --password-stdin https://gcr.io
- make docker
- make push
when:
status:
- success
ref:
- refs/tags/*
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
trigger:
event:
- tag
---
kind: pipeline
type: docker
name: base-images
trigger:
event:
- cron
steps:
- name: golang
image: docker
priviliged: true
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
GCLOUD_JSON_KEY:
from_secret: gcloud_json_key
commands:
- apk add make
- echo $GCLOUD_JSON_KEY | docker login -u _json_key --password-stdin https://gcr.io
- make -C deploy goimage
volumes:
- name: dockersock
host:
path: /var/run/docker.sock