drone-matrix/.drone.yml

149 lines
3.7 KiB
YAML
Raw Normal View History

workspace:
base: /go
path: src/github.com/drone-plugins/drone-matrix
pipeline:
2018-03-16 12:07:56 +00:00
deps:
image: golang:1.10
pull: true
commands:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure
test:
2018-03-16 12:07:56 +00:00
image: golang:1.10
pull: true
commands:
2018-03-16 12:07:56 +00:00
- go vet ./...
- go test -cover ./...
build_linux_amd64:
2018-03-16 12:07:56 +00:00
image: golang:1.10
pull: true
group: build
environment:
- 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-matrix
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-matrix
fi
build_linux_i386:
2018-03-16 12:07:56 +00:00
image: golang:1.10
pull: true
group: build
environment:
- GOOS=linux
- GOARCH=386
- CGO_ENABLED=0
commands:
- |
if test "${DRONE_TAG}" = ""; then
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-matrix
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-matrix
fi
build_linux_arm64:
2018-03-16 12:07:56 +00:00
image: golang:1.10
pull: true
group: build
environment:
- GOOS=linux
- GOARCH=arm64
- CGO_ENABLED=0
commands:
- |
if test "${DRONE_TAG}" = ""; then
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-matrix
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-matrix
fi
build_linux_arm:
2018-03-16 12:07:56 +00:00
image: golang:1.10
pull: true
group: build
environment:
- GOOS=linux
- GOARCH=arm
- CGO_ENABLED=0
- GOARM=7
commands:
- |
if test "${DRONE_TAG}" = ""; then
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-matrix
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-matrix
fi
publish_linux_amd64:
2018-03-16 12:07:56 +00:00
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
group: docker
repo: plugins/matrix
auto_tag: true
2018-01-23 22:20:50 +00:00
auto_tag_suffix: linux-amd64
dockerfile: Dockerfile
when:
event: [ push, tag ]
publish_linux_i386:
2018-03-16 12:07:56 +00:00
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
group: docker
repo: plugins/matrix
auto_tag: true
2018-01-23 22:20:50 +00:00
auto_tag_suffix: linux-i386
dockerfile: Dockerfile.i386
when:
event: [ push, tag ]
publish_linux_arm64:
2018-03-16 12:07:56 +00:00
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
group: docker
repo: plugins/matrix
auto_tag: true
2018-01-23 22:20:50 +00:00
auto_tag_suffix: linux-arm64
dockerfile: Dockerfile.arm64
when:
event: [ push, tag ]
publish_linux_arm:
2018-03-16 12:07:56 +00:00
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
group: docker
repo: plugins/matrix
auto_tag: true
2018-01-23 22:20:50 +00:00
auto_tag_suffix: linux-arm
dockerfile: Dockerfile.arm
when:
event: [ push, tag ]
2018-01-09 10:22:43 +00:00
manifests:
image: plugins/manifest:1
pull: true
secrets: [ docker_username, docker_password ]
spec: manifest.tmpl
auto_tag: true
ignore_missing: true
when:
event: [ push, tag ]
microbadger:
image: plugins/webhook:1
pull: true
secrets: [ webhook_url ]
when:
status: [ success ]