forked from appleboy/gorush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
71 lines (63 loc) · 1.42 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
workspace:
path: /go/src/github.com/appleboy/gorush
pipeline:
# restore the cache from an sftp server
restore_cache:
image: appleboy/drone-sftp-cache
restore: true
mount: [ .glide, vendor ]
ignore_branch: true
build:
image: appleboy/golang-testing:${GO_VERSION}
environment:
- GOPATH=/go
commands:
- make dep_install
- make vet
- make lint
- make build
- coverage all
- curl -s https://codecov.io/bash > .codecov &&
chmod +x .codecov &&
./.codecov -t ${CODECOV_TOKEN} -f .cover/coverage.txt
# build binary for docker image
- make docker_binary_build
docker:
image: plugins/docker
repo: appleboy/gorush
tags: [ '${DRONE_TAG}' ]
when:
event: [ tag ]
branch: [ refs/tags/* ]
docker:
image: plugins/docker
repo: appleboy/gorush
tags: [ 'latest' ]
when:
event: [ push ]
branch: [ master ]
facebook:
image: appleboy/drone-facebook
pull: true
to: 1234973386524610
when:
status: [ success, failure ]
matrix:
GO_VERSION: 1.7.4
# rebuild the cache on the sftp server
rebuild_cache:
image: appleboy/drone-sftp-cache
rebuild: true
mount: [ .glide, vendor ]
ignore_branch: true
when:
branch: master
matrix:
GO_VERSION: 1.7.4
services:
redis:
image: redis:alpine
matrix:
GO_VERSION:
- 1.7.4
- 1.6.4