grim/convey

closing closed branch again
multiple-images
2018-01-26, Gary Kramlich
8e45b1f8ccff
closing closed branch again
environment:
- CONVEY_VERSION=0.3.2dev
- WORK_PATH=/go/src/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-*
testing:
image: convey/go-test:latest
workspace: ${WORK_PATH}
workdir: ${WORK_PATH}
build-linux:
image: convey/go-build:latest
command: -o convey-${CONVEY_VERSION}-linux-amd64
environment:
- GOOS=linux
- GOARCH=amd64
workspace: ${WORK_PATH}
workdir: ${WORK_PATH}
build-alpine:
image: convey/go-build:alpine
command: -o convey-${CONVEY_VERSION}-alpine-amd64
environment:
- GOOS=linux
- GOARCH=amd64
workspace: ${WORK_PATH}
workdir: ${WORK_PATH}
build-windows:
image: convey/go-build:latest
command: -o convey-${CONVEY_VERSION}-windows-amd64.exe
environment:
- GOOS=windows
- GOARCH=amd64
workspace: ${WORK_PATH}
workdir: ${WORK_PATH}
build-darwin:
image: convey/go-build:latest
command: -o convey-${CONVEY_VERSION}-darwin-amd64
environment:
- GOOS=darwin
- GOARCH=amd64
workspace: ${WORK_PATH}
workdir: ${WORK_PATH}
# 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:run.sh
tag: convey/bitbucket-upload
build-image-checksum:
type: build
dockerfile: images/checksum/Dockerfile
tag: convey/checksum
files:
- images/checksum/run.sh: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: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:run.sh
build-image-go-test:
type: build
dockerfile: images/go-test/Dockerfile
tag: convey/go-test
files:
- images/go-test/run.sh: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:run.sh
build-image-template:
type: build
dockerfile: images/template/Dockerfile
tag: convey/template
files:
- images/template/run.sh: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:zglob.go
# debugging tasks
debug-env:
image: convey/env
plans:
# the default build plan
default:
stages:
- name: import-source
tasks:
- import
- name: testing
tasks: [testing]
- 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-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]