@@ -2,20 +2,20 @@ workspace:
2
2
base : /srv/app
3
3
path : src/code.gitea.io/gitea
4
4
5
- pipeline :
6
- clone :
7
- image : plugins/git
5
+ clone :
6
+ git :
7
+ image : plugins/git:latest
8
8
depth : 50
9
9
tags : true
10
10
11
+ pipeline :
11
12
build :
12
13
image : webhippie/golang:edge
13
14
pull : true
14
15
environment :
15
16
TAGS : bindata sqlite
16
17
GOPATH : /srv/app
17
18
commands :
18
- - apk -U add openssh-client
19
19
- make clean
20
20
- make generate
21
21
- make vet
@@ -30,32 +30,32 @@ pipeline:
30
30
test :
31
31
image : webhippie/golang:edge
32
32
pull : true
33
+ group : test
33
34
environment :
34
35
TAGS : bindata sqlite
35
36
GOPATH : /srv/app
36
37
commands :
37
- - apk -U add openssh-client
38
38
- make test
39
39
when :
40
- event : [ tag, pull_request ]
40
+ event : [ pull_request ]
41
41
42
- test- coverage :
42
+ coverage :
43
43
image : webhippie/golang:edge
44
44
pull : true
45
+ group : test
45
46
environment :
46
47
TAGS : bindata sqlite
47
48
GOPATH : /srv/app
48
49
commands :
49
- - apk -U add openssh-client
50
- - go get github.com/wadey/gocovmerge
51
- - make test-coverage
50
+ - make coverage
52
51
when :
53
- event : [ push ]
52
+ event : [ push, tag ]
54
53
branch : master
55
54
56
55
test-sqlite :
57
56
image : webhippie/golang:edge
58
57
pull : true
58
+ group : test
59
59
environment :
60
60
TAGS : bindata
61
61
GOPATH : /srv/app
@@ -67,6 +67,7 @@ pipeline:
67
67
test-mysql :
68
68
image : webhippie/golang:edge
69
69
pull : true
70
+ group : test
70
71
environment :
71
72
TAGS : bindata
72
73
GOPATH : /srv/app
@@ -78,6 +79,7 @@ pipeline:
78
79
test-pgsql :
79
80
image : webhippie/golang:edge
80
81
pull : true
82
+ group : test
81
83
environment :
82
84
TAGS : bindata
83
85
GOPATH : /srv/app
@@ -98,41 +100,46 @@ pipeline:
98
100
event : [ push, tag ]
99
101
100
102
# coverage:
101
- # image: plugins/coverage
103
+ # image: plugins/coverage:latest
104
+ # pull: true
105
+ # secrets: [ github_token ]
102
106
# server: https://coverage.gitea.io
103
- # when:
104
- # event: [ push ]
105
- # branch: master
106
107
107
108
docker :
108
- image : plugins/docker
109
+ image : plugins/docker:latest
109
110
pull : true
111
+ secrets : [ docker_username, docker_password ]
110
112
repo : gitea/gitea
111
113
tags : [ '${DRONE_TAG##v}' ]
112
114
when :
113
115
event : [ tag ]
114
116
branch : [ refs/tags/* ]
115
117
116
118
docker :
117
- image : plugins/docker
119
+ image : plugins/docker:latest
118
120
pull : true
121
+ secrets : [ docker_username, docker_password ]
119
122
repo : gitea/gitea
120
123
tags : [ '${DRONE_BRANCH##release/v}' ]
121
124
when :
122
125
event : [ push ]
123
126
branch : [ release/* ]
124
127
125
128
docker :
126
- image : plugins/docker
129
+ image : plugins/docker:latest
127
130
pull : true
131
+ secrets : [ docker_username, docker_password ]
128
132
repo : gitea/gitea
129
133
tags : [ 'latest' ]
130
134
when :
131
135
event : [ push ]
132
136
branch : [ master ]
133
137
134
138
release :
135
- image : plugins/s3
139
+ image : plugins/s3:latest
140
+ pull : true
141
+ secrets : [ s3_access_key, s3_secret_key ]
142
+ endpoint : https://storage.gitea.io
136
143
path_style : true
137
144
strip_prefix : dist/release/
138
145
source : dist/release/*
@@ -142,7 +149,10 @@ pipeline:
142
149
branch : [ refs/tags/* ]
143
150
144
151
release :
145
- image : plugins/s3
152
+ image : plugins/s3:latest
153
+ pull : true
154
+ secrets : [ s3_access_key, s3_secret_key ]
155
+ endpoint : https://storage.gitea.io
146
156
path_style : true
147
157
strip_prefix : dist/release/
148
158
source : dist/release/*
@@ -152,7 +162,10 @@ pipeline:
152
162
branch : [ release/* ]
153
163
154
164
release :
155
- image : plugins/s3
165
+ image : plugins/s3:latest
166
+ pull : true
167
+ secrets : [ s3_access_key, s3_secret_key ]
168
+ endpoint : https://storage.gitea.io
156
169
path_style : true
157
170
strip_prefix : dist/release/
158
171
source : dist/release/*
@@ -162,17 +175,18 @@ pipeline:
162
175
branch : [ master ]
163
176
164
177
github :
165
- image : plugins/github-release
178
+ image : plugins/github-release:latest
179
+ pull : true
166
180
files :
167
181
- dist/release/*
168
182
when :
169
183
event : [ tag ]
170
184
branch : [ refs/tags/* ]
171
185
172
186
discord :
173
- image : appleboy/drone-discord:0.0.4
174
- webhook_id : ${WEBHOOK_ID}
175
- webhook_token : ${WEBHOOK_TOKEN}
187
+ image : appleboy/drone-discord:latest
188
+ pull : true
189
+ secrets : [ discord_webhook_id, discord_webhook_token ]
176
190
when :
177
191
event : [ push, tag, pull_request ]
178
192
status : [ changed, failure ]
0 commit comments