drone-telegram/.drone.yml

217 lines
3.7 KiB
YAML
Raw Normal View History

2019-02-16 18:33:00 +03:00
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
clone:
disable: true
workspace:
2017-12-02 10:15:33 +03:00
base: /go/src
path: github.com/appleboy/drone-telegram
2019-02-16 18:33:00 +03:00
steps:
- name: git
pull: default
image: plugins/git
settings:
depth: 50
tags: true
2019-02-16 18:33:00 +03:00
- name: test
pull: always
image: golang:1.11
commands:
- make vet
- make lint
- make test-vendor
- make misspell-check
- make test
- make coverage
environment:
TELEGRAM_TO:
from_secret: telegram_to
TELEGRAM_TOKEN:
from_secret: telegram_token
- name: build_linux_amd64
pull: always
image: golang:1.11
commands:
- make build_linux_amd64
settings:
group: build
2019-02-16 18:33:00 +03:00
- name: build_linux_i386
pull: always
image: golang:1.11
commands:
- make build_linux_i386
settings:
group: build
2019-02-16 18:33:00 +03:00
- name: build_linux_arm64
pull: always
image: golang:1.11
commands:
- make build_linux_arm64
settings:
group: build
2019-02-16 18:33:00 +03:00
- name: build_linux_arm
pull: always
image: golang:1.11
commands:
- make build_linux_arm
settings:
group: build
2019-02-16 18:33:00 +03:00
- name: codecov
pull: default
image: robertstettner/drone-codecov
settings:
files:
2019-02-16 18:33:00 +03:00
- .cover/coverage.txt
environment:
CODECOV_TOKEN:
from_secret: codecov_token
when:
event:
- push
- pull_request
- name: release
pull: always
image: golang:1.11
commands:
- make release
when:
event:
- tag
- name: publish_alpine
pull: always
image: plugins/docker
settings:
default_suffix: alpine
2019-02-16 18:33:00 +03:00
default_tags: true
dockerfile: Dockerfile.alpine
2017-12-02 10:27:50 +03:00
group: release
2019-02-16 18:33:00 +03:00
repo: "${DRONE_REPO}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
event:
- push
- tag
- name: publish_linux_amd64
pull: always
image: plugins/docker:17.05
settings:
auto_tag: true
dockerfile: Dockerfile
group: release
2019-02-16 18:33:00 +03:00
repo: "${DRONE_REPO}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
event:
- push
- tag
- name: publish_linux_i386
pull: always
image: plugins/docker:17.05
settings:
auto_tag: true
auto_tag_suffix: i386
dockerfile: Dockerfile.i386
group: release
2019-02-16 18:33:00 +03:00
repo: "${DRONE_REPO}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
event:
- push
- tag
- name: publish_linux_arm64
pull: always
image: plugins/docker:17.05
settings:
auto_tag: true
auto_tag_suffix: arm64
dockerfile: Dockerfile.arm64
group: release
2019-02-16 18:33:00 +03:00
repo: "${DRONE_REPO}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
event:
- push
- tag
- name: publish_linux_arm
pull: always
image: plugins/docker:17.05
settings:
auto_tag: true
auto_tag_suffix: arm
dockerfile: Dockerfile.arm
2017-12-02 10:27:50 +03:00
group: release
2019-02-16 18:33:00 +03:00
repo: "${DRONE_REPO}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
event:
- push
- tag
- name: github
pull: always
image: plugins/github-release
settings:
files:
2019-02-16 18:33:00 +03:00
- "dist/release/*"
group: release
environment:
GITHUB_RELEASE_API_KEY:
from_secret: github_release_api_key
when:
event:
- tag
- name: discord
pull: always
image: appleboy/drone-discord
environment:
DISCORD_WEBHOOK_ID:
from_secret: discord_webhook_id
DISCORD_WEBHOOK_TOKEN:
from_secret: discord_webhook_token
when:
status:
- changed
- failure
...