-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
78 lines (67 loc) · 1.28 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
kind: pipeline
type: ssh
name: 部署API网关
server:
host:
from_secret: ssh_host
user: root
ssh_key:
from_secret: ssh_key
platform:
os: linux
arсh: amd64
clone:
disable: true
steps:
- name: clone
commands:
- git config --global http.proxy http://127.0.0.1:7890
- git config --global https.proxy http://127.0.0.1:7890
- git clone https://github.com/321CQU/API_Gateway.git
- cd ./API_Gateway/
- git checkout main
- name: 新建镜像
commands:
- source $${_321CQU_PUBLIC_REPOSITORY_PATH}/.env
- cd ./API_Gateway/
- docker build -t $${API_GATEWAY_IMAGE} .
- cd $${_321CQU_PUBLIC_REPOSITORY_PATH}
- docker-compose up -d $${API_GATEWAY_SERVER_NAME}
- docker image prune -f
depends_on:
- clone
trigger:
branch:
- main
event:
- push
- merge
---
kind: pipeline
type: docker
name: 通知
clone:
disable: true
steps:
- name: 钉钉通知
image: lddsb/drone-dingtalk-message
settings:
token:
from_secret: dingtalk_token
secret:
from_secret: dingtalk_sign
type: markdown
message_color: true
message_pic: true
sha_link: true
trigger:
branch:
- main
event:
- push
- merge
status:
- success
- failure
depends_on:
- 部署API网关