mirror of
https://github.com/josmo/drone-rancher.git
synced 2026-06-04 18:24:22 +08:00
94 lines
2.2 KiB
YAML
Executable File
94 lines
2.2 KiB
YAML
Executable File
workspace:
|
|
base: /go
|
|
path: src/github.com/josmo/drone-rancher
|
|
pipeline:
|
|
test:
|
|
image: golang:1.9
|
|
commands:
|
|
- go vet
|
|
- go test -cover -coverprofile=coverage.out
|
|
|
|
build_linux_amd64:
|
|
image: golang:1.9
|
|
group: build
|
|
environment:
|
|
- GOOS=linux
|
|
- GOARCH=amd64
|
|
- CGO_ENABLED=0
|
|
commands:
|
|
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-rancher
|
|
|
|
build_linux_arm64:
|
|
image: golang:1.9
|
|
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-rancher
|
|
|
|
build_linux_arm:
|
|
image: golang:1.9
|
|
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-rancher
|
|
|
|
# build_windows_amd64:
|
|
# image: golang:1.9-nanoserver
|
|
# group: build
|
|
# environment:
|
|
# - GOOS=windows
|
|
# - GOARCH=amd64
|
|
# - CGO_ENABLED=0
|
|
# commands:
|
|
# - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-webhook
|
|
|
|
publish_linux_amd64:
|
|
image: plugins/docker
|
|
username: josmo
|
|
repo: peloton/drone-rancher
|
|
auto_tag: true
|
|
secrets: [ docker_password ]
|
|
dockerfile: Dockerfile
|
|
when:
|
|
event: [ tag, push ]
|
|
|
|
publish_linux_arm64:
|
|
image: plugins/docker
|
|
username: josmo
|
|
repo: peloton/drone-rancher
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm64
|
|
secrets: [ docker_password ]
|
|
dockerfile: Dockerfile.arm64
|
|
when:
|
|
event: [ tag, push ]
|
|
|
|
publish_linux_arm:
|
|
image: plugins/docker
|
|
username: josmo
|
|
repo: peloton/drone-rancher
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm
|
|
secrets: [ docker_password ]
|
|
dockerfile: Dockerfile.arm
|
|
when:
|
|
event: [ tag, push ]
|
|
|
|
# publish_windows_amd64:
|
|
# image: plugins/docker
|
|
# username: josmo
|
|
# repo: peloton/drone-rancher
|
|
# tags: [ windows-amd64 ]
|
|
# secrets: [ docker_password ]
|
|
# dockerfile: Dockerfile.windows
|
|
# when:
|
|
# branch: master
|
|
# event: push
|