-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.multi.yml
71 lines (65 loc) · 1.33 KB
/
.drone.multi.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
kind: pipeline
name: default
clone:
depth: 10
steps:
# 开发版
- name: docker-${DRONE_BRANCH}
image: plugins/docker:18.09
settings:
username: drone
password:
from_secret: DOCKER_PASSWORD
registry: 192.168.66.100
repo: 192.168.66.100/test/demo
insecure: true
debug: true
dockerfile: Dockerfile
tags:
- canary
when:
branch:
- master
- dev
event:
- push
# 稳定版
- name: docker-release
image: plugins/docker:18.09
settings:
username: drone
password:
from_secret: DOCKER_PASSWORD
registry: 192.168.66.100
repo: 192.168.66.100/test/demo
insecure: true
dockerfile: Dockerfile
tags:
- ${DRONE_TAG}
- latest
when:
event:
- tag
# 开发版部署
- name: k8s-deploy-${DRONE_BRANCH}
image: 192.168.66.100/pub/kubectl:v1
commands:
- namespace=dev
- version=canary
- sh deploy.sh $namespace $version
when:
branch:
- master
- dev
event:
- push
# 稳定版部署
- name: k8s-deploy-release
image: 192.168.66.100/pub/kubectl:v1
commands:
- namespace=test
- version=${DRONE_TAG}
- sh deploy.sh $namespace $version
when:
event:
- tag