-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
139 lines (138 loc) · 3.04 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
---
image_pull_secrets:
- DOCKER_REGISTRY_AUTHENTICATION_JSON
kind: pipeline
name: CI pipeline
steps:
- commands:
- restore-cache
environment:
CACHE_EXTRA_DIRS: /root/.cargo,/root/.npm,/root/.rustup,.blaze/cache,.blaze/repositories,.blaze/rust
CACHE_KEY: blaze-ci-${DRONE_BRANCH}
CACHE_STORAGE: /var/lib/cache
failure: ignore
image: registry.rnzaou.me/ci:latest
name: restore cache
pull: always
volumes:
- name: cache
path: /var/lib/cache
when:
branch:
exclude:
- master
- commands:
- blaze run --target lint --all
image: registry.rnzaou.me/ci:latest
name: check
pull: always
- commands:
- blaze run cli:build-release
- blaze run --projects website,downloads --target build
image: registry.rnzaou.me/ci:latest
name: build
pull: always
volumes:
- name: docker-socket
path: /var/run/docker.sock
- commands:
- blaze run tests:run-release
image: registry.rnzaou.me/ci:latest
name: test
pull: always
volumes:
- name: docker-socket
path: /var/run/docker.sock
- commands:
- create-cache
environment:
CACHE_EXTRA_DIRS: /root/.cargo,/root/.npm,/root/.rustup,.blaze/cache,.blaze/repositories,.blaze/rust
CACHE_KEY: blaze-ci-${DRONE_BRANCH}
CACHE_STORAGE: /var/lib/cache
failure: ignore
image: registry.rnzaou.me/ci:latest
name: create cache
pull: always
volumes:
- name: cache
path: /var/lib/cache
when:
branch:
exclude:
- master
trigger:
event:
- push
- custom
type: docker
volumes:
- host:
path: /var/lib/cache
name: cache
- host:
path: /run/user/1002/docker.sock
name: docker-socket
---
image_pull_secrets:
- DOCKER_REGISTRY_AUTHENTICATION_JSON
kind: pipeline
name: Publish pipeline
steps:
- commands:
- blaze run --parallelism None --all --target publish
environment:
CARGO_TOKEN:
from_secret: CARGO_TOKEN
DOCKER_REGISTRY_PASSWORD:
from_secret: DOCKER_REGISTRY_PASSWORD
DOCKER_REGISTRY_USERNAME:
from_secret: DOCKER_REGISTRY_USERNAME
NPM_TOKEN:
from_secret: NPM_TOKEN
image: registry.rnzaou.me/ci:latest
name: publish packages
pull: always
volumes:
- name: docker-socket
path: /var/run/docker.sock
- commands:
- blaze run ci:push-release
image: registry.rnzaou.me/ci:latest
name: push release changes
pull: always
volumes:
- name: ssh
path: /root/.ssh
- commands:
- blaze run --parallelism None cli:deploy
environment:
DOCKER_REGISTRY_PASSWORD:
from_secret: DOCKER_REGISTRY_PASSWORD
DOCKER_REGISTRY_USERNAME:
from_secret: DOCKER_REGISTRY_USERNAME
image: registry.rnzaou.me/ci:latest
name: deploy binaries
pull: always
volumes:
- name: builds
path: /var/lib/blaze/builds
- name: docker-socket
path: /var/run/docker.sock
trigger:
event:
- promote
type: docker
volumes:
- host:
path: /var/lib/drone/.ssh
name: ssh
- host:
path: /var/lib/blaze/builds
name: builds
- host:
path: /run/user/1002/docker.sock
name: docker-socket
---
kind: signature
hmac: 850551cd6986ff349bbd41a74140b11b9c7832fa10e94fd5485d874baf8668b9
...