Packer plugin for Drone CI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.3 KiB

workspace:
base: /go/src
path: github.com/appleboy/drone-packer
clone:
git:
image: plugins/git
depth: 50
tags: true
pipeline:
lint:
image: golang:1.11
pull: true
commands:
- make vet
- make revive
- make test-vendor
- make misspell-check
- make test
codecov:
image: robertstettner/drone-codecov
secrets: [ codecov_token ]
files:
- coverage.txt
when:
event: [ push, pull_request ]
build_linux_amd64:
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_amd64
build_linux_i386:
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_i386
build_linux_arm64:
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_arm64
build_linux_arm:
image: golang:1.11
pull: true
group: build
commands:
- make build_linux_arm
publish_linux_amd64:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
group: release
repo: ${DRONE_REPO}
auto_tag: true
dockerfile: Dockerfile
when:
event: [ push, tag ]
local: false
# publish_linux_arm:
# image: plugins/docker:17.05
# pull: true
# secrets: [ docker_username, docker_password ]
# group: release
# repo: ${DRONE_REPO}
# auto_tag: true
# auto_tag_suffix: arm
# dockerfile: Dockerfile.arm
# when:
# event: [ push, tag ]
# local: false
# publish_linux_arm64:
# image: plugins/docker:17.05
# pull: true
# secrets: [ docker_username, docker_password ]
# group: release
# repo: ${DRONE_REPO}
# auto_tag: true
# auto_tag_suffix: arm64
# dockerfile: Dockerfile.arm64
# when:
# event: [ push, tag ]
# local: false
# publish_linux_i386:
# image: plugins/docker:17.05
# pull: true
# secrets: [ docker_username, docker_password ]
# group: release
# repo: ${DRONE_REPO}
# auto_tag: true
# auto_tag_suffix: i386
# dockerfile: Dockerfile.i386
# when:
# event: [ push, tag ]
# local: false
discord:
image: appleboy/drone-discord
pull: true
secrets: [ discord_webhook_id, discord_webhook_token ]
when:
status: [ success, failure ]