drone-ssh/.drone.yml
Bo-Yi Wu e057a699a4 refactor: add group build for drone. (#97)
* refactor: add group build for drone.

* remove codecov_token

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix path

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-15 14:52:35 +08:00

107 lines
2.0 KiB
YAML

workspace:
base: /srv/app
path: src/github.com/appleboy/drone-ssh
clone:
git:
image: plugins/git
depth: 50
tags: true
pipeline:
lint:
image: appleboy/golang-testing
pull: true
group: golang
environment:
TAGS: netgo
GOPATH: /srv/app
commands:
- make vet
- make lint
- make test-vendor
build:
image: appleboy/golang-testing
pull: true
group: golang
environment:
TAGS: netgo
GOPATH: /srv/app
commands:
- make build
test:
image: appleboy/golang-testing
pull: true
group: golang
environment:
TAGS: netgo
GOPATH: /srv/app
commands:
- make ssh-server
- make test
- make coverage
codecov:
image: robertstettner/drone-codecov
secrets: [ codecov_token ]
files:
- .cover/coverage.txt
when:
event: [ push, pull_request ]
status: [ success ]
publish_latest:
image: plugins/docker
repo: ${DRONE_REPO}
tags: [ 'latest' ]
secrets: [ docker_username, docker_password ]
when:
event: [ push ]
branch: [ master ]
local: false
release:
image: appleboy/golang-testing
pull: true
environment:
TAGS: netgo
GOPATH: /srv/app
commands:
- make release
when:
event: [ tag ]
branch: [ refs/tags/* ]
local: false
publish_tag:
image: plugins/docker
repo: ${DRONE_REPO}
tags: [ '${DRONE_TAG}' ]
secrets: [ docker_username, docker_password ]
group: release
when:
event: [ tag ]
branch: [ refs/tags/* ]
local: false
release_tag:
image: plugins/github-release
secrets: [ github_release_api_key ]
group: release
files:
- dist/release/*
when:
event: [ tag ]
branch: [ refs/tags/* ]
local: false
facebook:
image: appleboy/drone-facebook
secrets: [ fb_page_token, fb_verify_token ]
pull: true
to: 1234973386524610
when:
status: [ changed, failure ]