Skip to content

Commit 4b8fef1

Browse files
authored
Changes for latest DroneCI (#2362)
1 parent 95c408f commit 4b8fef1

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed

.drone.yml

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ workspace:
22
base: /srv/app
33
path: src/code.gitea.io/gitea
44

5-
pipeline:
6-
clone:
7-
image: plugins/git
5+
clone:
6+
git:
7+
image: plugins/git:1
88
depth: 50
99
tags: true
1010

11+
pipeline:
1112
build:
1213
image: webhippie/golang:edge
1314
pull: true
1415
environment:
1516
TAGS: bindata sqlite
1617
GOPATH: /srv/app
1718
commands:
18-
- apk -U add openssh-client
1919
- make clean
2020
- make generate
2121
- make vet
@@ -30,43 +30,31 @@ pipeline:
3030
test:
3131
image: webhippie/golang:edge
3232
pull: true
33+
group: test
3334
environment:
3435
TAGS: bindata sqlite
3536
GOPATH: /srv/app
3637
commands:
37-
- apk -U add openssh-client
38-
- make test
39-
when:
40-
event: [ tag, pull_request ]
41-
42-
test-coverage:
43-
image: webhippie/golang:edge
44-
pull: true
45-
environment:
46-
TAGS: bindata sqlite
47-
GOPATH: /srv/app
48-
commands:
49-
- apk -U add openssh-client
50-
- go get github.com/wadey/gocovmerge
51-
- make test-coverage
38+
- make coverage
5239
when:
53-
event: [ push ]
54-
branch: master
40+
event: [ push, tag, pull_request ]
5541

5642
test-sqlite:
5743
image: webhippie/golang:edge
5844
pull: true
45+
group: test
5946
environment:
6047
TAGS: bindata
6148
GOPATH: /srv/app
6249
commands:
63-
- echo "Needs to be fixed" # make test-sqlite
50+
- make test-sqlite
6451
when:
6552
event: [ push, tag, pull_request ]
6653

6754
test-mysql:
6855
image: webhippie/golang:edge
6956
pull: true
57+
group: test
7058
environment:
7159
TAGS: bindata
7260
GOPATH: /srv/app
@@ -78,6 +66,7 @@ pipeline:
7866
test-pgsql:
7967
image: webhippie/golang:edge
8068
pull: true
69+
group: test
8170
environment:
8271
TAGS: bindata
8372
GOPATH: /srv/app
@@ -86,6 +75,12 @@ pipeline:
8675
when:
8776
event: [ push, tag, pull_request ]
8877

78+
# coverage:
79+
# image: plugins/coverage:latest
80+
# pull: true
81+
# secrets: [ github_token ]
82+
# server: https://coverage.gitea.io
83+
8984
static:
9085
image: karalabe/xgo-latest:latest
9186
pull: true
@@ -97,42 +92,41 @@ pipeline:
9792
when:
9893
event: [ push, tag ]
9994

100-
# coverage:
101-
# image: plugins/coverage
102-
# server: https://coverage.gitea.io
103-
# when:
104-
# event: [ push ]
105-
# branch: master
106-
10795
docker:
108-
image: plugins/docker
96+
image: plugins/docker:17.05
10997
pull: true
98+
secrets: [ docker_username, docker_password ]
11099
repo: gitea/gitea
111100
tags: [ '${DRONE_TAG##v}' ]
112101
when:
113102
event: [ tag ]
114103
branch: [ refs/tags/* ]
115104

116105
docker:
117-
image: plugins/docker
106+
image: plugins/docker:17.05
118107
pull: true
108+
secrets: [ docker_username, docker_password ]
119109
repo: gitea/gitea
120110
tags: [ '${DRONE_BRANCH##release/v}' ]
121111
when:
122112
event: [ push ]
123113
branch: [ release/* ]
124114

125115
docker:
126-
image: plugins/docker
116+
image: plugins/docker:17.05
127117
pull: true
118+
secrets: [ docker_username, docker_password ]
128119
repo: gitea/gitea
129120
tags: [ 'latest' ]
130121
when:
131122
event: [ push ]
132123
branch: [ master ]
133124

134125
release:
135-
image: plugins/s3
126+
image: plugins/s3:1
127+
pull: true
128+
secrets: [ s3_access_key, s3_secret_key ]
129+
endpoint: https://storage.gitea.io
136130
path_style: true
137131
strip_prefix: dist/release/
138132
source: dist/release/*
@@ -142,7 +136,10 @@ pipeline:
142136
branch: [ refs/tags/* ]
143137

144138
release:
145-
image: plugins/s3
139+
image: plugins/s3:1
140+
pull: true
141+
secrets: [ s3_access_key, s3_secret_key ]
142+
endpoint: https://storage.gitea.io
146143
path_style: true
147144
strip_prefix: dist/release/
148145
source: dist/release/*
@@ -152,7 +149,10 @@ pipeline:
152149
branch: [ release/* ]
153150

154151
release:
155-
image: plugins/s3
152+
image: plugins/s3:1
153+
pull: true
154+
secrets: [ s3_access_key, s3_secret_key ]
155+
endpoint: https://storage.gitea.io
156156
path_style: true
157157
strip_prefix: dist/release/
158158
source: dist/release/*
@@ -162,17 +162,18 @@ pipeline:
162162
branch: [ master ]
163163

164164
github:
165-
image: plugins/github-release
165+
image: plugins/github-release:1
166+
pull: true
166167
files:
167168
- dist/release/*
168169
when:
169170
event: [ tag ]
170171
branch: [ refs/tags/* ]
171172

172173
discord:
173-
image: appleboy/drone-discord:0.0.4
174-
webhook_id: ${WEBHOOK_ID}
175-
webhook_token: ${WEBHOOK_TOKEN}
174+
image: appleboy/drone-discord:1.0.0
175+
pull: true
176+
secrets: [ discord_webhook_id, discord_webhook_token ]
176177
when:
177178
event: [ push, tag, pull_request ]
178179
status: [ changed, failure ]

.drone.yml.sig

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ fmt-check: required-gofmt-version
125125
test: fmt-check
126126
$(GO) test $(PACKAGES)
127127

128-
.PHONY: test-coverage
129-
test-coverage: unit-test-coverage integration-test-coverage
128+
.PHONY: coverage
129+
coverage: unit-test-coverage integration-test-coverage
130130
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
131131
$(GO) get -u github.com/wadey/gocovmerge; \
132132
fi

0 commit comments

Comments
 (0)