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-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:
|
2017-02-25 12:31:49 +00:00
|
|
|
- make deps
|
2016-12-07 09:37:43 +00:00
|
|
|
- make vet
|
|
|
|
- make lint
|
|
|
|
- make build
|
2017-02-25 12:31:49 +00:00
|
|
|
- make embedmd
|
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:
|
2017-02-19 10:29:28 +00:00
|
|
|
GO_VERSION: 1.8.0
|
2016-12-08 03:43:23 +00:00
|
|
|
|
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:
|
2017-02-19 10:29:28 +00:00
|
|
|
GO_VERSION: 1.8.0
|
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:
|
2017-02-19 10:29:28 +00:00
|
|
|
GO_VERSION: 1.8.0
|
2016-12-08 03:43:23 +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:
|
2017-02-19 10:29:28 +00:00
|
|
|
- 1.8.0
|
2017-02-06 05:42:39 +00:00
|
|
|
- 1.7.5
|
2016-12-07 07:43:17 +00:00
|
|
|
- 1.6.4
|