summaryrefslogtreecommitdiff
path: root/hooks/post_push
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2018-04-25 16:31:28 -0400
committerDave Henderson <dhenderson@gmail.com>2018-04-25 16:31:28 -0400
commit604039a37b41e8fbcebdfd94a0bdced5c209bf62 (patch)
treeabcc8622d1290f42fa90b704dfdbb56d06375604 /hooks/post_push
parent6bb146a08237f57ecc21c5ac48d8314aa047a3fa (diff)
Adding alpine Docker image variant
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'hooks/post_push')
-rwxr-xr-xhooks/post_push8
1 files changed, 7 insertions, 1 deletions
diff --git a/hooks/post_push b/hooks/post_push
index 2a0457b7..03e88cac 100755
--- a/hooks/post_push
+++ b/hooks/post_push
@@ -9,11 +9,15 @@ docker push ${DOCKER_REPO}:artifacts
if [ "$DOCKER_TAG" == "latest" ]; then
export SLIM_TAG="slim"
+ export ALPINE_TAG="alpine"
else
export SLIM_TAG="${DOCKER_TAG}-slim"
+ export ALPINE_TAG="${DOCKER_TAG}-alpine"
fi
-# Need to push the slim image too
+
+# Need to push the other images too
docker push $DOCKER_REPO:${SLIM_TAG}
+docker push $DOCKER_REPO:${ALPINE_TAG}
# This magic figures out if we're currently on a tag (i.e. a release).
# We only want to have special tags for releases.
@@ -21,6 +25,8 @@ if (git describe --abbrev=0 --exact-match &>/dev/null); then
tag=$(git describe --abbrev=0 --exact-match)
docker tag $IMAGE_NAME $DOCKER_REPO:$tag
docker tag $DOCKER_REPO:${SLIM_TAG} $DOCKER_REPO:${tag}-slim
+ docker tag $DOCKER_REPO:${ALPINE_TAG} $DOCKER_REPO:${tag}-alpine
docker push $DOCKER_REPO:$tag
docker push $DOCKER_REPO:${tag}-slim
+ docker push $DOCKER_REPO:${tag}-alpine
fi