Skip to content

Commit faf4b50

Browse files
tboergerappleboy
authored andcommitted
Changes for latest DroneCI (#2355)
1 parent 7455604 commit faf4b50

File tree

2 files changed

+41
-27
lines changed

2 files changed

+41
-27
lines changed

.drone.yml

Lines changed: 39 additions & 25 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:latest
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,32 +30,32 @@ 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
3838
- make test
3939
when:
40-
event: [ tag, pull_request ]
40+
event: [ pull_request ]
4141

42-
test-coverage:
42+
coverage:
4343
image: webhippie/golang:edge
4444
pull: true
45+
group: test
4546
environment:
4647
TAGS: bindata sqlite
4748
GOPATH: /srv/app
4849
commands:
49-
- apk -U add openssh-client
50-
- go get github.com/wadey/gocovmerge
51-
- make test-coverage
50+
- make coverage
5251
when:
53-
event: [ push ]
52+
event: [ push, tag ]
5453
branch: master
5554

5655
test-sqlite:
5756
image: webhippie/golang:edge
5857
pull: true
58+
group: test
5959
environment:
6060
TAGS: bindata
6161
GOPATH: /srv/app
@@ -67,6 +67,7 @@ pipeline:
6767
test-mysql:
6868
image: webhippie/golang:edge
6969
pull: true
70+
group: test
7071
environment:
7172
TAGS: bindata
7273
GOPATH: /srv/app
@@ -78,6 +79,7 @@ pipeline:
7879
test-pgsql:
7980
image: webhippie/golang:edge
8081
pull: true
82+
group: test
8183
environment:
8284
TAGS: bindata
8385
GOPATH: /srv/app
@@ -98,41 +100,46 @@ pipeline:
98100
event: [ push, tag ]
99101

100102
# coverage:
101-
# image: plugins/coverage
103+
# image: plugins/coverage:latest
104+
# pull: true
105+
# secrets: [ github_token ]
102106
# server: https://coverage.gitea.io
103-
# when:
104-
# event: [ push ]
105-
# branch: master
106107

107108
docker:
108-
image: plugins/docker
109+
image: plugins/docker:latest
109110
pull: true
111+
secrets: [ docker_username, docker_password ]
110112
repo: gitea/gitea
111113
tags: [ '${DRONE_TAG##v}' ]
112114
when:
113115
event: [ tag ]
114116
branch: [ refs/tags/* ]
115117

116118
docker:
117-
image: plugins/docker
119+
image: plugins/docker:latest
118120
pull: true
121+
secrets: [ docker_username, docker_password ]
119122
repo: gitea/gitea
120123
tags: [ '${DRONE_BRANCH##release/v}' ]
121124
when:
122125
event: [ push ]
123126
branch: [ release/* ]
124127

125128
docker:
126-
image: plugins/docker
129+
image: plugins/docker:latest
127130
pull: true
131+
secrets: [ docker_username, docker_password ]
128132
repo: gitea/gitea
129133
tags: [ 'latest' ]
130134
when:
131135
event: [ push ]
132136
branch: [ master ]
133137

134138
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
136143
path_style: true
137144
strip_prefix: dist/release/
138145
source: dist/release/*
@@ -142,7 +149,10 @@ pipeline:
142149
branch: [ refs/tags/* ]
143150

144151
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
146156
path_style: true
147157
strip_prefix: dist/release/
148158
source: dist/release/*
@@ -152,7 +162,10 @@ pipeline:
152162
branch: [ release/* ]
153163

154164
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
156169
path_style: true
157170
strip_prefix: dist/release/
158171
source: dist/release/*
@@ -162,17 +175,18 @@ pipeline:
162175
branch: [ master ]
163176

164177
github:
165-
image: plugins/github-release
178+
image: plugins/github-release:latest
179+
pull: true
166180
files:
167181
- dist/release/*
168182
when:
169183
event: [ tag ]
170184
branch: [ refs/tags/* ]
171185

172186
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 ]
176190
when:
177191
event: [ push, tag, pull_request ]
178192
status: [ changed, failure ]

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)