-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
123 lines (107 loc) · 2.44 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
122
123
kind: secret
name: token_docker
get:
path: secrets
name: token_docker_dronestock
---
kind: secret
name: password_ccr
get:
path: secrets
name: password_ccr
---
kind: secret
name: token_github
get:
path: secrets
name: token_github_storezhang
---
kind: pipeline
type: docker
name: 发布
clone:
disable: true
environment:
NAME: maven
OUTPUT_LINUX: maven.amd64.lin
OUTPUT_WINDOWS: maven.amd64.exe
OUTPUT_MAC: maven.amd64.mac
CHANGELOG_TAG_OUTPUT: CHANGELOG.tag.md
steps:
- name: 取码
image: ccr.ccs.tencentyun.com/dronestock/git
- name: 编译
image: ccr.ccs.tencentyun.com/pangum/drone
volumes:
- name: go
path: /var/lib/go
settings:
outputs:
- name: $${NAME}
os: linux
arch: amd64
- name: $${OUTPUT_LINUX}
os: linux
arch: amd64
- name: $${OUTPUT_WINDOWS}
os: windows
arch: amd64
- name: $${OUTPUT_MAC}
os: darwin
arch: amd64
- name: 推送
image: ccr.ccs.tencentyun.com/dronestock/docker
privileged: true
volumes:
- name: docker
path: /var/lib/docker
environment:
PASSWORD_DOCKER:
from_secret: token_docker
PASSWORD_CCR:
from_secret: password_ccr
settings:
repository: dronestock/$${NAME}
registries:
- username: dronestock
password: $${PASSWORD_DOCKER}
- hostname: ccr.ccs.tencentyun.com
username: "160290688"
password: $${PASSWORD_CCR}
required: true
- name: 改变
image: ccr.ccs.tencentyun.com/dronestock/changelog
when:
event:
- tag
settings:
output: $${CHANGELOG_TAG_OUTPUT}
tag: $${DRONE_TAG}
- name: 发布
image: ccr.ccs.tencentyun.com/dronestock/github
when:
event:
- tag
environment:
VERSION: $${DRONE_TAG##v}
TOKEN:
from_secret: token_github
settings:
release:
tag: $${DRONE_TAG}
token: $${TOKEN}
body: file('$${CHANGELOG_TAG_OUTPUT}')
assets:
- name: $${NAME}-$${VERSION}-linux-amd64
file: $${OUTPUT_LINUX}
- name: $${NAME}-$${VERSION}-windows-amd64.exe
file: $${OUTPUT_WINDOWS}
- name: $${NAME}-$${VERSION}-darwin-amd64
file: $${OUTPUT_MAC}
volumes:
- name: go
host:
path: /var/lib/cache/go
- name: docker
host:
path: /var/lib/cache/docker