grim/convey

Parents aef9401d6902
Children 9e372e58d1d8
Remove the template image as it's not really necessary and should be standalone if people need it
--- a/convey.yml Sat Jul 27 11:25:20 2019 -0500
+++ b/convey.yml Sat Jul 27 11:27:02 2019 -0500
@@ -90,12 +90,6 @@
type: docker/build
dockerfile: images/env/Dockerfile
tag: convey/env
- build-image-template:
- type: docker/build
- dockerfile: images/template/Dockerfile
- tag: convey/template
- files:
- - images/template/run.sh
# debugging tasks
debug-env:
@@ -142,7 +136,6 @@
concurrent: true
tasks:
- build-image-env
- - build-image-template
debug:
stages:
- tasks: [debug-env]
--- a/images/template/Dockerfile Sat Jul 27 11:25:20 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-FROM gliderlabs/alpine:edge
-
-COPY run.sh /
-
-RUN apk add --no-cache gettext
-
-ENTRYPOINT ["/run.sh"]
--- a/images/template/README.md Sat Jul 27 11:25:20 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# convey/template
-
-The template image is an image that can take a string or the path of a file within
-the workspace and output another file within the workspace with the environment
-variables replaced.
-
-## Example
-
- tasks:
- build-info:
- type: docker/run
- image: convey/template:latest
- environment:
- - TEMPLATE_STRING='branch: ${HG_BRANCH}\ncommit: ${HG_COMMIT_SHORT}'
- - TEMPLATE_OUTPUT=/build_info
-
-## Environment Variables
-
-### TEMPLATE_FILE
-
-The path of a file within the workspace to use as a template for the output.
-
-### TEMPLATE_STRING
-
-A string to use as a template for the output. This variable takes precedence over
-`TEMPLATE_FILE` if both are provided.
-
-One thing to note with this value is that you're most likely going to want to enclose
-it with single quotes as in the example above. This will ensure the environment
-variables and any escape characters such as `\n` are still included in the output file.
-
-### TEMPLATE_OUTPUT
-
-The path of a file within the workspace to write the output of the template to.
--- a/images/template/run.sh Sat Jul 27 11:25:20 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-if [ -z $TEMPLATE_OUTPUT ]; then
- echo 'TEMPLATE_OUTPUT was not specified';
- exit 1;
-fi
-
-if [ -z $TEMPLATE_STRING ]; then
- if [ -z $TEMPLATE_FILE ]; then
- echo 'Either TEMPLATE_STRING or TEMPLATE_FILE must be set';
- exit 1;
- fi;
- if [ ! -e ${CONVEY_WORKSPACE}/${TEMPLATE_FILE} ]; then
- echo "Could not find template file ${TEMPLATE_FILE}";
- exit 1;
- fi;
- TEMPLATE_STRING=$(cat ${CONVEY_WORKSPACE}/${TEMPLATE_FILE})
-fi
-
-echo -e "$TEMPLATE_STRING" | envsubst > ${CONVEY_WORKSPACE}/${TEMPLATE_OUTPUT}