Merge pull request #90 from josmo/update-droneio

update .drone.yml for 1.0 of drone
This commit is contained in:
Ivan Pedrazas
2019-02-02 16:16:10 +00:00
committed by GitHub
2 changed files with 33 additions and 72 deletions
+31 -69
View File
@@ -1,86 +1,48 @@
kind: pipeline
name: default
workspace:
base: /go
path: src/github.com/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
pipeline:
deps:
steps:
- name: deps
image: golang:1.10
pull: true
commands:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -update
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -update
test:
- name: test
image: golang:1.10
commands:
- go vet
- go test ./... -cover -coverprofile=coverage.out
- go vet
- go test ./... -cover -coverprofile=coverage.out
build_linux_amd64:
- name: build_linux_amd64
image: golang:1.10
group: build
environment:
- GOOS=linux
- GOARCH=amd64
- CGO_ENABLED=0
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
commands:
- |
if test "${DRONE_TAG}" = ""; then
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/${DRONE_REPO_NAME}
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/${DRONE_REPO_NAME}
fi
# - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-helm
# build_linux_arm64:
# image: golang:1.10
# group: build
# environment:
# - GOOS=linux
# - GOARCH=arm64
# - CGO_ENABLED=0
# commands:
# - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-helm
#
# build_linux_arm:
# image: golang:1.10
# group: build
# environment:
# - GOOS=linux
# - GOARCH=arm
# - CGO_ENABLED=0
# - GOARM=7
# commands:
# - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-helm
publish_linux_amd64:
- |
if test "${DRONE_TAG}" = ""; then
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/${DRONE_REPO_NAME}
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/${DRONE_REPO_NAME}
fi
- name: publish_linux_amd64
image: plugins/docker
group: publish
auto_tag: true
secrets: [ docker_password, docker_username, plugin_repo ]
dockerfile: Dockerfile
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: Dockerfile
repo:
from_secret: dockerhub_repo
when:
event: [ tag, push ]
# publish_linux_arm64:
# image: plugins/docker
# group: publish
# username: josmo
# repo: peloton/drone-helm
# auto_tag: true
# auto_tag_suffix: linux-arm64
# secrets: [ docker_password ]
# dockerfile: Dockerfile.arm64
# when:
# event: [ tag, push ]
#
# publish_linux_arm:
# image: plugins/docker
# group: publish
# username: josmo
# repo: peloton/drone-helm
# auto_tag: true
# auto_tag_suffix: linux-arm
# secrets: [ docker_password ]
# dockerfile: Dockerfile.arm
# when:
# event: [ tag, push ]
+2 -3
View File
@@ -1,6 +1,6 @@
# Helm (Kubernetes) plugin for drone.io
[![Build Status](https://drone.pelo.tech/api/badges/josmo/drone-helm/status.svg)](https://drone.pelo.tech/josmo/drone-helm)
[![Build Status](https://cloud.drone.io/api/badges/josmo/drone-helm/status.svg)](https://cloud.drone.io/josmo/drone-helm)
[![Go Doc](https://godoc.org/github.com/josmo/drone-helm?status.svg)](http://godoc.org/github.com/josmo/drone-helm)
[![Go Report](https://goreportcard.com/badge/github.com/josmo/drone-helm)](https://goreportcard.com/report/github.com/josmo/drone-helm)
[![](https://images.microbadger.com/badges/image/peloton/drone-helm.svg)](https://microbadger.com/images/peloton/drone-helm "Get your own image badge on microbadger.com")
@@ -39,5 +39,4 @@ This repo is setup in a way that if you enable a personal drone server to build
build and publish your image (makes it easier to test PRs and use the image till the contributions get merged)
* Build local ```DRONE_REPO_OWNER=ipedrazas DRONE_REPO_NAME=drone-helm drone exec```
* on your server just make sure you have DOCKER_USERNAME, DOCKER_PASSWORD, and PLUGIN_REPO set as secrets
* on your server just make sure you have DOCKER_USERNAME, DOCKER_PASSWORD, and DOCKERHUB_REPO set as secrets