-
Notifications
You must be signed in to change notification settings - Fork 127
/
.drone.yml
121 lines (116 loc) · 2.55 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
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: clone
image: "drone/git:latest"
environment:
HTTP_PROXY:
from_secret: proxy
HTTPS_PROXY:
from_secret: proxy
http_proxy:
from_secret: proxy
https_proxy:
from_secret: proxy
NOPROXY: localhost
noproxy: localhost
- name: build
image: node:12.16.2
environment:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
NODE_OPTIONS: "--max_old_space_size=4096"
HTTP_PROXY:
from_secret: proxy
HTTPS_PROXY:
from_secret: proxy
http_proxy:
from_secret: proxy
https_proxy:
from_secret: proxy
NOPROXY: localhost
noproxy: localhost
commands:
- which yarn
- yarn install
- yarn build
- mv ./build /website
volumes:
- name: vol
path: /website
- name: preview
image: kingsd/drone-oss:v0.0.6
settings:
dist: /website/build
dist_ignore: img/
path: docs-rancher2-3-preview
endpoint: oss-cn-shanghai.aliyuncs.com
access_key_id:
from_secret: ACCESS_KEY_ID
access_key_secret:
from_secret: ACCESS_KEY_SECRET
volumes:
- name: vol
path: /website
when:
ref:
include:
- "refs/heads/preview"
event:
- push
- name: production
image: kingsd/drone-oss:v0.0.6
settings:
dist: /website/build
dist_ignore: img/
path: docs-rancher2-3-production
endpoint: oss-cn-shanghai.aliyuncs.com
access_key_id:
from_secret: ACCESS_KEY_ID
access_key_secret:
from_secret: ACCESS_KEY_SECRET
volumes:
- name: vol
path: /website
when:
ref:
include:
- "refs/heads/master"
event:
- push
- name: build-pdf
image: reg.cnrancher.com/tool/node-chrome:12.16.0-stable
environment:
PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome
commands:
- ln -s /website/build ./build
- yarn generate
volumes:
- name: vol
path: /website
when:
event:
- tag
- name: push-pdf
image: kingsd/drone-oss:v0.0.6
settings:
dist: ./build_docs
path: pdf-rancher-private
endpoint: oss-cn-shanghai.aliyuncs.com
access_key_id:
from_secret: ACCESS_KEY_ID
access_key_secret:
from_secret: ACCESS_KEY_SECRET
when:
event:
- tag
volumes:
- name: vol
temp: {}
node:
instance: agent-amd64