2017-07-04 07:45:25 +03:00
|
|
|
workspace:
|
2017-12-02 10:15:33 +03:00
|
|
|
base: /go/src
|
|
|
|
path: github.com/appleboy/drone-telegram
|
2017-07-04 07:45:25 +03:00
|
|
|
|
|
|
|
clone:
|
|
|
|
git:
|
|
|
|
image: plugins/git
|
|
|
|
depth: 50
|
|
|
|
tags: true
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
test:
|
|
|
|
image: appleboy/golang-testing
|
|
|
|
pull: true
|
|
|
|
secrets: [ codecov_token, telegram_token, telegram_to ]
|
|
|
|
commands:
|
|
|
|
- make vet
|
|
|
|
- make lint
|
|
|
|
- make test-vendor
|
|
|
|
- make misspell-check
|
|
|
|
- make test
|
|
|
|
- make coverage
|
|
|
|
- make build
|
|
|
|
# build binary for docker image
|
|
|
|
- make static_build
|
|
|
|
when:
|
|
|
|
event: [ push, tag, pull_request ]
|
|
|
|
|
|
|
|
release:
|
|
|
|
image: appleboy/golang-testing
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- make release
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
|
|
|
|
docker:
|
|
|
|
image: plugins/docker
|
|
|
|
repo: ${DRONE_REPO}
|
|
|
|
tags: [ '${DRONE_TAG}' ]
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
|
|
|
|
docker:
|
|
|
|
image: plugins/docker
|
|
|
|
repo: ${DRONE_REPO}
|
|
|
|
tags: [ 'latest' ]
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
when:
|
|
|
|
event: [ push ]
|
|
|
|
branch: [ master ]
|
|
|
|
|
|
|
|
github:
|
|
|
|
image: plugins/github-release
|
2017-07-05 11:11:52 +03:00
|
|
|
secrets: [ github_release_api_key ]
|
2017-07-04 07:45:25 +03:00
|
|
|
files:
|
|
|
|
- dist/release/*
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
|
2017-12-02 10:19:01 +03:00
|
|
|
discord:
|
|
|
|
image: appleboy/drone-discord
|
2017-07-04 07:45:25 +03:00
|
|
|
pull: true
|
2017-12-02 10:19:01 +03:00
|
|
|
secrets: [ discord_webhook_id, discord_webhook_token ]
|
2017-07-04 07:45:25 +03:00
|
|
|
when:
|
|
|
|
status: [ changed, failure ]
|