forked from sunny0826/pipeline-example-maven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
62 lines (56 loc) · 1.16 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
kind: pipeline
name: pipeline-example-maven
steps:
- name: Maven编译
image: maven:3-jdk-7
volumes:
- name: cache
path: /root/.m2
commands:
- mvn clean install
- name: 构建镜像
image: plugins/docker
volumes:
- name: docker
path: /var/run/docker.sock
settings:
username:
from_secret: docker_user
password:
from_secret: docker_pass
repo: registry-vpc.cn-shanghai.aliyuncs.com/keking/pipeline-example-maven
registry: registry-vpc.cn-shanghai.aliyuncs.com
tags: ${DRONE_TAG=latest}
- name: Kubernetes 部署
image: guoxudongdocker/kubectl:v1.14.1
volumes:
- name: kube
path: /root/.kube
commands:
- ls
- kubectl apply -f deployment.yaml
- name: 钉钉通知
image: guoxudongdocker/drone-dingtalk
settings:
token:
from_secret: dingding
type: markdown
message_color: true
message_pic: true
sha_link: true
when:
status: [failure, success]
brach: [master]
volumes:
- name: cache
host:
path: /tmp/cache/.m2
- name: kube
host:
path: /tmp/cache/.kube/.test_kube
- name: docker
host:
path: /var/run/docker.sock
trigger:
branch:
- master