grim/convey

Clean up convey.yml a bit

2020-03-02, Gary Kramlich
029768cfe81d
Clean up convey.yml a bit
---
required-version: 0.14.0-dev
environment:
- CONVEY_VERSION=0.14.0-dev
tasks:
# tasks for the default plan
import:
type: convey/import
files:
- .:.
export:
type: convey/export
files:
- convey-${CONVEY_VERSION}-darwin-amd64
- convey-${CONVEY_VERSION}-freebsd-amd64
- convey-${CONVEY_VERSION}-linux-amd64
- convey-${CONVEY_VERSION}-windows-amd64.exe
clean:
type: convey/clean
files:
- convey-*
go-test:
type: docker/run
image: golang:1.12-buster
workdir: ${CONVEY_WORKSPACE}
command: go test ./...
build-linux:
type: docker/run
image: golang:1.12-buster
environment:
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=amd64
workdir: ${CONVEY_WORKSPACE}
command: go build -o convey-${CONVEY_VERSION}-linux-amd64
build-windows:
type: docker/run
image: golang:1.12-buster
environment:
- GOOS=windows
- GOARCH=amd64
workdir: ${CONVEY_WORKSPACE}
command: go build -o convey-${CONVEY_VERSION}-windows-amd64.exe
build-darwin:
type: docker/run
image: golang:1.12-buster
environment:
- GOOS=darwin
- GOARCH=amd64
workdir: ${CONVEY_WORKSPACE}
command: go build -o convey-${CONVEY_VERSION}-darwin-amd64
build-freebsd:
type: docker/run
image: golang:1.12-buster
environment:
- GOOS=freebsd
- GOARCH=amd64
workdir: ${CONVEY_WORKSPACE}
command: go build -o convey-${CONVEY_VERSION}-freebsd-amd64
# tasks for the deploy plan
import-release:
type: convey/import
files:
- convey-${CONVEY_VERSION}-freebsd-amd64
- convey-${CONVEY_VERSION}-darwin-amd64
- convey-${CONVEY_VERSION}-linux-amd64
- convey-${CONVEY_VERSION}-windows-amd64.exe
create-checksums:
type: docker/run
image: rwgrim/checksum
environment:
- SHA256_FILES=convey-${CONVEY_VERSION}-linux-amd64 convey-${CONVEY_VERSION}-windows-amd64.exe convey-${CONVEY_VERSION}-darwin-amd64
deploy-to-bitbucket:
type: docker/run
image: rwgrim/bitbucket-upload
environment:
- BITBUCKET_REPO=rw_grim/convey
- BITBUCKET_AUTH_USER=rw_grim
- BITBUCKET_AUTH_PASSWORD
- BITBUCKET_FILES=*
plans:
# the default build plan
default:
stages:
- name: import-source
tasks:
- import
- name: testing
tasks:
- go-test
- name: build
concurrent: true
tasks:
- build-darwin
- build-freebsd
- build-linux
- build-windows
- name: export
tasks:
- export
# plan to deploy releases to bitbucket
deploy:
stages:
- name: prepare
tasks:
- import-release
- create-checksums
- name: upload
tasks:
- deploy-to-bitbucket
clean:
stages:
- name: clean
tasks: [clean]
meta-plans:
everything:
plans:
- default
release:
plans:
- default
- deploy