grim/convey

closing merged branch
hostnames
2017-10-13, Gary Kramlich
33eae19fcbbe
closing merged branch
environment:
- CONVEY_VERSION=0.10.3dev
- GO_PACKAGE=bitbucket.org/rw_grim/convey
tasks:
# tasks for the default plan
import:
type: import
files:
- .
export:
type: export
files:
- convey-${CONVEY_VERSION}-alpine-amd64
- convey-${CONVEY_VERSION}-linux-amd64
- convey-${CONVEY_VERSION}-windows-amd64.exe
- convey-${CONVEY_VERSION}-darwin-amd64
clean:
type: clean
files:
- convey-*
- '**/junit.xml'
go-test:
image: convey/go-test:latest
command: -cover -sweet.opt "junit.output=junit.xml"
export-junit:
type: export
files:
- '**/junit.xml'
go-vet:
image: convey/go-vet:latest
build-linux:
image: convey/go-build:latest
command: -o convey-${CONVEY_VERSION}-linux-amd64
environment:
- GOOS=linux
- GOARCH=amd64
build-alpine:
image: convey/go-build:alpine
command: -o convey-${CONVEY_VERSION}-alpine-amd64
environment:
- GOOS=linux
- GOARCH=amd64
build-windows:
image: convey/go-build:latest
command: -o convey-${CONVEY_VERSION}-windows-amd64.exe
environment:
- GOOS=windows
- GOARCH=amd64
build-darwin:
image: convey/go-build:latest
command: -o convey-${CONVEY_VERSION}-darwin-amd64
environment:
- GOOS=darwin
- GOARCH=amd64
# tasks for the deploy plan
import-release:
type: import
files:
- convey-${CONVEY_VERSION}-alpine-amd64
- convey-${CONVEY_VERSION}-linux-amd64
- convey-${CONVEY_VERSION}-windows-amd64.exe
- convey-${CONVEY_VERSION}-darwin-amd64
create-checksums:
image: convey/checksum
environment:
- 'SHA256_FILES="convey-${CONVEY_VERSION}-linux-amd64 convey-${CONVEY_VERSION}-windows-amd64.exe convey-${CONVEY_VERSION}-darwin-amd64 convey-${CONVEY_VERSION}-alpine-amd64"'
deploy-to-bitbucket:
image: convey/bitbucket-upload
environment:
- BITBUCKET_REPO=rw_grim/convey
- BITBUCKET_AUTH_USER=rw_grim
- BITBUCKET_AUTH_PASSWORD
- BITBUCKET_FILES=*
# tasks for creating images
import-images:
type: import
files:
- images
build-image-bitbucket-upload:
type: build
dockerfile: images/bitbucket-upload/Dockerfile
files:
- images/bitbucket-upload/run.sh
tag: convey/bitbucket-upload
build-image-checksum:
type: build
dockerfile: images/checksum/Dockerfile
tag: convey/checksum
files:
- images/checksum/run.sh
build-image-env:
type: build
dockerfile: images/env/Dockerfile
tag: convey/env
build-image-go-build:
type: build
dockerfile: images/go-build/Dockerfile
tag: convey/go-build
files:
- images/go-build/run.sh
build-image-go-build-alpine:
type: build
dockerfile: images/go-build-alpine/Dockerfile
tag: convey/go-build:alpine
files:
- images/go-build-alpine/run.sh
build-image-go-test:
type: build
dockerfile: images/go-test/Dockerfile
tag: convey/go-test
files:
- images/go-test/run.sh
build-image-go-vet:
type: build
dockerfile: images/go-vet/Dockerfile
tag: convey/go-vet:latest
files:
- images/go-vet/run.sh
build-image-rust-build-linux:
type: build
dockerfile: images/rust-build-linux/Dockerfile
tag: convey/rust-build-linux
files:
- images/rust-build-linux/run.sh
build-image-template:
type: build
dockerfile: images/template/Dockerfile
tag: convey/template
files:
- images/template/run.sh
build-image-workspace:
type: build
dockerfile: images/workspace/Dockerfile
tag: convey/workspace
build-image-workspace-tools:
type: build
dockerfile: images/workspace-tools/Dockerfile
tag: convey/workspace-tools
files:
- images/workspace-tools/zglob.go
# debugging tasks
debug-env:
image: convey/env
plans:
# the default build plan
default:
stages:
- name: import-source
tasks:
- import
- name: testing
tasks:
- go-vet
- go-test
- export-junit
- name: build
concurrent: true
tasks:
- build-alpine
- build-linux
- build-windows
- build-darwin
- 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
# plan to build support images
images:
stages:
- name: images-import
tasks:
- import-images
- name: images-build
concurrent: true
tasks:
- build-image-bitbucket-upload
- build-image-checksum
- build-image-env
- build-image-go-build
- build-image-go-test
- build-image-go-vet
- build-image-workspace
- build-image-workspace-tools
- build-image-go-build-alpine
- build-image-rust-build-linux
- build-image-template
debug:
stages:
- tasks: [debug-env]
environment:
- HG_COMMIT
- HG_COMMIT_SHORT
- HG_BRANCH
clean:
stages:
- name: clean
tasks: [clean]
meta-plans:
everything:
plans:
- images
- default
release:
plans:
- default
- deploy