grim/convey

Clean up images:

2019-07-27, Gary Kramlich
66f30f8e3cc8
Parents 2d15c52b8c11
Children aef9401d6902
Clean up images:

* Remove all the go build and tests images as go modules makes them unnecessary
* Replace convey/bitbucket-upload with rwgrim/bitbucket-upload
* Replace convey/checksum with rwgrim/checksum
--- a/convey.yml Sat Jul 27 10:31:49 2019 -0500
+++ b/convey.yml Sat Jul 27 11:00:47 2019 -0500
@@ -69,12 +69,12 @@
- convey-${CONVEY_VERSION}-windows-amd64.exe
create-checksums:
type: docker/run
- image: convey/checksum
+ 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: convey/bitbucket-upload
+ image: rwgrim/bitbucket-upload
environment:
- BITBUCKET_REPO=rw_grim/convey
- BITBUCKET_AUTH_USER=rw_grim
@@ -86,34 +86,10 @@
type: docker/import
files:
- images
- build-image-bitbucket-upload:
- type: docker/build
- dockerfile: images/bitbucket-upload/Dockerfile
- files:
- - images/bitbucket-upload/run.sh
- tag: convey/bitbucket-upload
- build-image-checksum:
- type: docker/build
- dockerfile: images/checksum/Dockerfile
- tag: convey/checksum
- files:
- - images/checksum/run.sh
build-image-env:
type: docker/build
dockerfile: images/env/Dockerfile
tag: convey/env
- build-image-go-build:
- type: docker/build
- dockerfile: images/go-build/Dockerfile
- tag: convey/go-build
- files:
- - images/go-build/run.sh
- build-image-go-test:
- type: docker/build
- dockerfile: images/go-test/Dockerfile
- tag: convey/go-test
- files:
- - images/go-test/run.sh
build-image-template:
type: docker/build
dockerfile: images/template/Dockerfile
@@ -175,11 +151,7 @@
- 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-template
- build-image-workspace
- build-image-workspace-tools
--- a/images/bitbucket-upload/Dockerfile Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-FROM gliderlabs/alpine:edge
-
-RUN set -ex && \
- apk add --no-cache curl ca-certificates
-
-COPY run.sh /
-
-CMD ["/run.sh"]
--- a/images/bitbucket-upload/README.md Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-# convey/bitbucket-upload
-
-The bitbucket-upload image will upload files from your work space to the downloads section of our bitbucket repository.
-
-## Example
-
- tasks:
- release:
- type: docker/run
- image: convey/bitbucket-upload
- environment:
- - BITBUCKET_REPO=rw_grim/convey
- - BITBUCKET_AUTH_USER=rw_grim
- - BITBUCKET_AUTH_PASSWORD
- - BITBUCKET_FILES=*
-
-## Environment variables
-
-### BITBUCKET_REPO
-
-The name of the bitbucket repository to upload files to. This should be in owner/repo_slug format.
-
-### BITBUCKET_AUTH_USER
-
-The Bitbucket username to autenticate with.
-
-### BITBUCKET_AUTH_PASSWORD
-
-The password to use for authentication. Typically this will be an app password.
-
-You are advised to set it in the environment before running convey. When the value is given without an = then the value from the host will be used.
-
-### BITBUCKET_FILES
-
-A space separate list of shell globs of files to upload from the workspace.
--- a/images/bitbucket-upload/run.sh Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ -z "${BITBUCKET_REPO}" ] ; then
- echo "you must specify a BITBUCKET_REPO" >&2
-
- exit 1
-fi
-
-if [ -z "${BITBUCKET_AUTH_USER}" ] ; then
- echo "BITBUCKET_AUTH_USER not set. You must specify a user to authenticate as"
-
- exit 1
-fi
-
-if [ -z "${BITBUCKET_AUTH_PASSWORD}" ] ; then
- echo "BITBUCKET_AUTH_PASSWORD not set."
-
- exit 1
-fi
-
-BITBUCKET_HOST="${BITBUCKET_HOST:-api.bitbucket.org}"
-BITBUCKET_ROOT_URL="${BITBUCKET_URL:-https://${BITBUCKET_HOST}/2.0/}"
-
-BITBUCKET_ROOT_URL=$(echo ${BITBUCKET_ROOT_URL} | sed 's@/*$@@')
-BITBUCKET_REPO=$(echo ${BITBUCKET_REPO} | sed 's@^/*@@' | sed 's@/*$@@')
-
-cd ${CONVEY_WORKSPACE}
-
-FILE_ARGS=""
-for FILE_NAME in ${BITBUCKET_FILES}; do
- FILE_ARGS="${FILE_ARGS} -F files=@\"${FILE_NAME}\""
-done
-
-set +x
-printf "machine ${BITBUCKET_HOST} login ${BITBUCKET_AUTH_USER} password ${BITBUCKET_AUTH_PASSWORD}" | \
- (set -x; curl ${BITBUCKET_OPTIONS} --netrc-file /dev/stdin ${BITBUCKET_ROOT_URL}/repositories/${BITBUCKET_REPO}/downloads ${FILE_ARGS})
--- a/images/checksum/Dockerfile Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-FROM gliderlabs/alpine:edge
-
-COPY run.sh /run.sh
-
-ENTRYPOINT ["/run.sh"]
-
--- a/images/checksum/README.md Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# convey/checksum
-
-The checksum image will create md5/sha1/sha256/sha3/sha512 checksums for files in the workspace. The checksum files will be the filenames with the extension for the checksum appended on it.
-
-## Example
-
- tasks:
- create-checksums:
- type: docker/run
- image: convey/checksum
- environment:
- - 'SHA256_FILES="convey-linux-amd64 convey-windows-amd64.exe convey-darwin-amd64"'
-
-## Environment Variables
-
-### MD5_FILES
-
-A space separate list of files to create MD5 checksums for.
-
-### SHA1_FILES
-
-A space separate list of files to create SHA1 checksums for.
-
-### SHA256_FILES
-
-A space separate list of files to create SHA256 checksums for.
-
-### SHA3_FILES
-
-A space separate list of files to create SHA3 checksums for.
-
-### SHA512_FILES
-
-A space separate list of files to create SHA512 checksums for.
--- a/images/checksum/run.sh Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-checksum() {
- COMMAND=$1
- EXTENSION=$2
- shift 2
-
- for FILENAME in "$@"; do
- ${COMMAND} "${FILENAME}" > "${FILENAME}.${EXTENSION}"
- done
-}
-
-cd ${CONVEY_WORKSPACE}
-
-checksum md5sum md5 ${MD5_FILES}
-checksum sha1sum sha1 ${SHA1_FILES}
-checksum sha256sum sha256 ${SHA256_FILES}
-checksum sha3sum sha3 ${SHA3_FILES}
-checksum sha512sum sha512 ${SHA512_FILES}
--- a/images/go-build-alpine/Dockerfile Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-FROM golang:1.10-alpine
-
-COPY run.sh /
-
-RUN set -ex && \
- apk add --no-cache git mercurial
-
-ENTRYPOINT ["/run.sh"]
--- a/images/go-build-alpine/README.md Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-# convey/go-build
-
-The go-build image is a simple wrapper around the official golang:alpine image.
-
-## Example
-
- tasks:
- build-linux:
- type: docker/run
- image: convey/go-build:latest
- command: -o convey-linux-amd64
- environment:
- - CGO_ENABLED=0
- - GOOS=linux
- - GOARCH=amd64
- - GO_PACKAGE=bitbucket.org/rw_grim/convey
-
-## Command
-
-Additional arguments to pass to go build.
-
-## Environment Variables
-
-GO_PACKAGE if set will put the root of the workspace into the correct path in $GOPATH.
-
--- a/images/go-build-alpine/run.sh Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-if [ -n ${GO_PACKAGE} ] ; then
- _PACKAGE_PATH="/go/src/${GO_PACKAGE}"
- _PARENT=$(dirname ${_PACKAGE_PATH})
- mkdir -p ${_PARENT}
- ln -s ${CONVEY_WORKSPACE} ${_PACKAGE_PATH}
- cd ${_PACKAGE_PATH}
-fi
-
-go get -v $(go list ./... | grep -v vendor)
-go build -x -i -v $@
--- a/images/go-build/Dockerfile Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-FROM golang:1.10-stretch
-
-COPY run.sh /
-
-ENTRYPOINT ["/run.sh"]
--- a/images/go-build/README.md Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-# convey/go-build
-
-The go-build image is a simple wrapper around the official golang:latest image.
-
-## Example
-
- tasks:
- build-linux:
- type: docker/run
- image: convey/go-build:latest
- command: -o convey-linux-amd64
- environment:
- - CGO_ENABLED=0
- - GOOS=linux
- - GOARCH=amd64
- - GO_PACKAGE=bitbucket.org/rw_grim/convey
-
-## Command
-
-Additional arguments to pass to go build.
-
-## Environment Variables
-
-GO_PACKAGE if set will put the root of the workspace into the correct path in $GOPATH.
-
--- a/images/go-build/run.sh Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-if [ -n ${GO_PACKAGE} ] ; then
- _PACKAGE_PATH="/go/src/${GO_PACKAGE}"
- _PARENT=$(dirname ${_PACKAGE_PATH})
- mkdir -p ${_PARENT}
- ln -s ${CONVEY_WORKSPACE} ${_PACKAGE_PATH}
- cd ${_PACKAGE_PATH}
-fi
-
-go get -v $(go list ./... | grep -v vendor)
-go build -x -i -v $@
--- a/images/go-test/Dockerfile Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-FROM golang:1.10-stretch
-
-COPY run.sh /
-
-ENTRYPOINT ["/run.sh"]
--- a/images/go-test/README.md Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# convey/go-test
-
-The go-test image is a simple wrapper around the official golang:latest image.
-
-## Example
-
- tasks:
- testing:
- type: docker/run
- image: convey/go-test:latest
- environment:
- - GO_PACKAGE=bitbucket.org/rw_grim/convey
-
-## Command
-
-Additional arguments to pass to go build.
-
-## Environment Variables
-
-GO_PACKAGE if set will put the root of the workspace in the appropriate path in $GOPATH.
-
--- a/images/go-test/run.sh Sat Jul 27 10:31:49 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-if [ -n ${GO_PACKAGE} ] ; then
- _PACKAGE_PATH="/go/src/${GO_PACKAGE}"
- _PARENT=$(dirname ${_PACKAGE_PATH})
- mkdir -p ${_PARENT}
- ln -s ${CONVEY_WORKSPACE} ${_PACKAGE_PATH}
- cd ${_PACKAGE_PATH}
-fi
-
-GO_PACKAGES=$(go list ./... | grep -v vendor)
-
-go get -v -t ${GO_PACKAGES}
-go test -v ${GO_PACKAGES} $@