2016-12-07 07:43:17 +00:00
|
|
|
workspace:
|
|
|
|
path: /go/src/github.com/appleboy/gorush
|
|
|
|
|
2016-08-06 15:01:27 +00:00
|
|
|
pipeline:
|
2017-01-12 14:18:24 +00:00
|
|
|
clone:
|
|
|
|
image: plugins/git
|
|
|
|
tags: true
|
|
|
|
|
2016-09-22 01:34:13 +00:00
|
|
|
# restore the cache from an sftp server
|
|
|
|
restore_cache:
|
|
|
|
image: appleboy/drone-sftp-cache
|
|
|
|
restore: true
|
|
|
|
mount: [ .glide, vendor ]
|
|
|
|
ignore_branch: true
|
|
|
|
|
2016-08-06 15:01:27 +00:00
|
|
|
build:
|
2016-08-29 07:32:03 +00:00
|
|
|
image: appleboy/golang-testing:${GO_VERSION}
|
2016-08-06 15:01:27 +00:00
|
|
|
environment:
|
|
|
|
- GOPATH=/go
|
|
|
|
commands:
|
2016-12-07 08:46:27 +00:00
|
|
|
- make dep_install
|
2016-12-07 09:37:43 +00:00
|
|
|
- make vet
|
|
|
|
- make lint
|
|
|
|
- make build
|
2016-12-07 09:00:22 +00:00
|
|
|
- coverage all
|
2016-12-08 03:43:23 +00:00
|
|
|
# send coverage report
|
2017-01-17 02:44:33 +00:00
|
|
|
- make coverage
|
2016-12-07 09:37:43 +00:00
|
|
|
# build binary for docker image
|
2016-12-08 04:01:10 +00:00
|
|
|
- make docker_build
|
2016-12-07 08:46:27 +00:00
|
|
|
|
2016-12-08 03:43:23 +00:00
|
|
|
release:
|
|
|
|
image: appleboy/golang-testing:${GO_VERSION}
|
|
|
|
pull: true
|
|
|
|
environment:
|
|
|
|
TAGS: netgo
|
|
|
|
commands:
|
|
|
|
- make release
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
branch: [ refs/tags/* ]
|
|
|
|
matrix:
|
|
|
|
GO_VERSION: 1.7.4
|
|
|
|
|
2016-12-07 08:46:27 +00:00
|
|
|
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 ]
|
2016-08-06 15:01:27 +00:00
|
|
|
|
2016-09-28 02:12:08 +00:00
|
|
|
facebook:
|
|
|
|
image: appleboy/drone-facebook
|
|
|
|
pull: true
|
|
|
|
to: 1234973386524610
|
|
|
|
when:
|
|
|
|
status: [ success, failure ]
|
2016-10-02 14:05:13 +00:00
|
|
|
matrix:
|
2016-12-07 07:43:17 +00:00
|
|
|
GO_VERSION: 1.7.4
|
2016-09-28 02:12:08 +00:00
|
|
|
|
2016-12-08 03:43:23 +00:00
|
|
|
github:
|
|
|
|
image: plugins/github-release
|
|
|
|
files:
|
|
|
|
- dist/release/*
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
branch: [ refs/tags/* ]
|
|
|
|
matrix:
|
|
|
|
GO_VERSION: 1.7.4
|
|
|
|
|
2016-09-22 01:34:13 +00:00
|
|
|
# rebuild the cache on the sftp server
|
|
|
|
rebuild_cache:
|
|
|
|
image: appleboy/drone-sftp-cache
|
|
|
|
rebuild: true
|
|
|
|
mount: [ .glide, vendor ]
|
|
|
|
ignore_branch: true
|
2016-09-22 08:34:07 +00:00
|
|
|
when:
|
|
|
|
branch: master
|
2016-10-03 05:42:29 +00:00
|
|
|
matrix:
|
2016-12-07 07:43:17 +00:00
|
|
|
GO_VERSION: 1.7.4
|
2016-09-22 01:34:13 +00:00
|
|
|
|
2016-08-06 15:01:27 +00:00
|
|
|
services:
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
|
|
|
|
2016-08-29 07:32:03 +00:00
|
|
|
matrix:
|
|
|
|
GO_VERSION:
|
2016-12-07 07:43:17 +00:00
|
|
|
- 1.7.4
|
|
|
|
- 1.6.4
|