mirror of
https://github.com/ipedrazas/drone-helm.git
synced 2026-06-04 18:24:13 +08:00
Merge pull request #90 from josmo/update-droneio
update .drone.yml for 1.0 of drone
This commit is contained in:
+31
-69
@@ -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 ]
|
||||
@@ -1,6 +1,6 @@
|
||||
# Helm (Kubernetes) plugin for drone.io
|
||||
|
||||
[](https://drone.pelo.tech/josmo/drone-helm)
|
||||
[](https://cloud.drone.io/josmo/drone-helm)
|
||||
[](http://godoc.org/github.com/josmo/drone-helm)
|
||||
[](https://goreportcard.com/report/github.com/josmo/drone-helm)
|
||||
[](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
|
||||
|
||||
Reference in New Issue
Block a user