-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.drone.yml
More file actions
168 lines (165 loc) · 6.81 KB
/
.drone.yml
File metadata and controls
168 lines (165 loc) · 6.81 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
kind: pipeline
type: docker
name: workbench-be
trigger:
ref:
- refs/tags/release-*
clone:
depth: 1
steps:
- name: build user service image # 构建 user 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-user-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_user #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=user
- name: build gateway service image # 构建 gateway 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-gateway-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_gateway #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=gateway
- name: build status service image # 构建 status 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-status-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_status #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=status
- name: build feed service image # 构建 feed 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-feed-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_feed #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=feed
- name: build project service image # 构建 project 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-project-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_project #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=project
- name: build team service image # 构建 member 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-team-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_team #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=team
- name: build subscribe service image # 构建 subscribe 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-subscribe-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_subscribe #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=feed
- name: build attention service image # 构建 attention 服务镜像
image: plugins/docker
when:
ref:
- refs/tags/release-attention-*
volumes:
- name: dockersock # 挂载下面定义的Volumn
path: /var/run/docker.sock # 与宿主机用同一docker
settings: # plugins/docker用到的相关配置
username:
from_secret: docker_user # alicloud指定的docker hub的用户名(前面配置)
password:
from_secret: docker_password # alicloud指定的docker hub的密码(前面配置)
repo: registry-vpc.cn-hangzhou.aliyuncs.com/muxi_site/workbench_attention #要推送docker地址
registry: registry-vpc.cn-hangzhou.aliyuncs.com # 使用的docker hub地址
tags: ${DRONE_TAG}
build_args:
- service_name=attention
# - name: send remind
# image: golang
# when:
# status:
# - success
# - failure
# commands:
# - curl -X POST 'http://47.97.74.180:1217/bot/remind?build_status=${DRONE_BUILD_STATUS}&author=${DRONE_COMMIT_AUTHOR}&repo=${DRONE_REPO}&host=${DRONE_SYSTEM_HOST}&repo_link=${DRONE_REPO_LINK}&tag=${DRONE_TAG}&failed_steps=${DRONE_FAILED_STEPS}'
volumes:
- name: dockersock
host:
path: /var/run/docker.sock