2016-12-07 07:43:17 +00:00
|
|
|
workspace:
|
2017-05-04 03:09:07 +00:00
|
|
|
base: /srv/app
|
|
|
|
path: src/github.com/appleboy/gorush
|
2016-12-07 07:43:17 +00:00
|
|
|
|
2017-05-04 03:09:07 +00:00
|
|
|
clone:
|
|
|
|
git:
|
2017-01-12 14:18:24 +00:00
|
|
|
image: plugins/git
|
2017-04-30 10:17:17 +00:00
|
|
|
depth: 50
|
2017-01-12 14:18:24 +00:00
|
|
|
tags: true
|
|
|
|
|
2017-05-04 03:09:07 +00:00
|
|
|
pipeline:
|
2016-08-06 15:01:27 +00:00
|
|
|
build:
|
2017-05-04 03:09:07 +00:00
|
|
|
image: appleboy/golang-testing
|
|
|
|
secrets: [ codecov_token, android_test_token, android_api_key ]
|
2016-08-06 15:01:27 +00:00
|
|
|
environment:
|
2017-05-04 03:09:07 +00:00
|
|
|
- GOPATH=/srv/app
|
2016-08-06 15:01:27 +00:00
|
|
|
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 08:46:27 +00:00
|
|
|
|
2016-12-08 03:43:23 +00:00
|
|
|
release:
|
2017-05-04 03:09:07 +00:00
|
|
|
image: appleboy/golang-testing
|
2016-12-08 03:43:23 +00:00
|
|
|
pull: true
|
|
|
|
environment:
|
2017-05-12 04:01:38 +00:00
|
|
|
GOPATH: /srv/app
|
2016-12-08 03:43:23 +00:00
|
|
|
TAGS: netgo
|
|
|
|
commands:
|
|
|
|
- make release
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
branch: [ refs/tags/* ]
|
|
|
|
|
2017-05-12 03:39:18 +00:00
|
|
|
publish_latest:
|
2016-12-07 08:46:27 +00:00
|
|
|
image: plugins/docker
|
2017-05-15 15:29:49 +00:00
|
|
|
pull: true
|
2017-05-12 03:39:18 +00:00
|
|
|
repo: ${DRONE_REPO}
|
|
|
|
tags: [ 'latest' ]
|
2017-05-04 03:09:07 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
2016-12-07 08:46:27 +00:00
|
|
|
when:
|
2017-05-12 03:39:18 +00:00
|
|
|
event: [ push ]
|
|
|
|
branch: [ master ]
|
|
|
|
local: false
|
2016-12-07 08:46:27 +00:00
|
|
|
|
2017-05-12 03:39:18 +00:00
|
|
|
publish_tag:
|
2016-12-07 08:46:27 +00:00
|
|
|
image: plugins/docker
|
2017-05-15 15:29:49 +00:00
|
|
|
pull: true
|
2017-05-12 03:39:18 +00:00
|
|
|
repo: ${DRONE_REPO}
|
|
|
|
tags: [ '${DRONE_TAG}' ]
|
2017-05-04 03:09:07 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
2017-05-12 03:39:18 +00:00
|
|
|
group: release
|
2016-12-07 08:46:27 +00:00
|
|
|
when:
|
2017-05-12 03:39:18 +00:00
|
|
|
event: [ tag ]
|
|
|
|
branch: [ refs/tags/* ]
|
|
|
|
local: false
|
2016-08-06 15:01:27 +00:00
|
|
|
|
2017-05-12 03:39:18 +00:00
|
|
|
release_tag:
|
2016-12-08 03:43:23 +00:00
|
|
|
image: plugins/github-release
|
2017-05-12 03:39:18 +00:00
|
|
|
secrets: [ github_release_api_key ]
|
|
|
|
group: release
|
2016-12-08 03:43:23 +00:00
|
|
|
files:
|
|
|
|
- dist/release/*
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
branch: [ refs/tags/* ]
|
2017-05-12 03:39:18 +00:00
|
|
|
local: false
|
2016-12-08 03:43:23 +00:00
|
|
|
|
2017-05-04 03:09:07 +00:00
|
|
|
facebook:
|
|
|
|
image: appleboy/drone-facebook
|
|
|
|
secrets: [ fb_page_token, fb_verify_token ]
|
|
|
|
pull: true
|
|
|
|
to: 1234973386524610
|
|
|
|
when:
|
|
|
|
status: [ success, failure ]
|
|
|
|
|
2016-08-06 15:01:27 +00:00
|
|
|
services:
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|