mirror of
https://github.com/ipedrazas/drone-helm.git
synced 2026-06-04 18:24:13 +08:00
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
workspace:
|
|
base: /go
|
|
|
|
pipeline:
|
|
test:
|
|
image: golang:1.6
|
|
environment:
|
|
- CGO_ENABLED=0
|
|
commands:
|
|
- go get
|
|
- go test -cover -coverprofile=coverage.out
|
|
- go build -ldflags "-s -w -X main.build=$DRONE_BUILD_NUMBER" -a -tags netgo
|
|
|
|
|
|
build_docker_image:
|
|
image: docker:1.12
|
|
environment:
|
|
- DOCKER_HOST=tcp://127.0.0.1:2375
|
|
- TAG=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:7}
|
|
commands:
|
|
- docker login -u="${QUAY_USERNAME}" -p="${QUAY_PASSWORD}" quay.io
|
|
- docker build -t image .
|
|
- docker tag image quay.io/ipedrazas/drone-helm:latest
|
|
- docker tag image quay.io/ipedrazas/drone-helm:${TAG}
|
|
- docker push quay.io/ipedrazas/drone-helm
|
|
# when:
|
|
# event: [push]
|
|
# branch: [master]
|
|
|
|
slack:
|
|
image: plugins/slack
|
|
channel: deploys
|
|
username: drone
|
|
template: >
|
|
{{ build.author }} finished building *<http://drone.sohohousedigital.com/SohoHouse/{{ repo.name }}/{{ build.number }}|{{ build.branch }} ({{ build.number }})>* of {{ repo.name }} with a {{ build.status }} status
|
|
|
|
|
|
services:
|
|
dind:
|
|
image: docker:1.12-dind
|
|
privileged: true
|
|
command:
|
|
- "-s"
|
|
- "overlay"
|
|
|
|
plugin:
|
|
name: drone-helm
|
|
desc: Execute helm to
|
|
type: deploy
|
|
image: quay.io/ipedrazas/drone-helm
|
|
labels:
|
|
- deploy
|
|
- kubernetes
|
|
- helm
|