From 0babeff695a82d66b8b318da3733259dc030c504 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 20 Aug 2022 23:54:50 +0200 Subject: [PATCH] with push release --- cuddle.yaml | 2 ++ scripts/push_release.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 scripts/push_release.sh diff --git a/cuddle.yaml b/cuddle.yaml index 8d7882c..7bfac21 100644 --- a/cuddle.yaml +++ b/cuddle.yaml @@ -18,3 +18,5 @@ scripts: type: shell setup_ssh: type: shell + push_release: + type: shell diff --git a/scripts/push_release.sh b/scripts/push_release.sh new file mode 100755 index 0000000..abec648 --- /dev/null +++ b/scripts/push_release.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}" + +if [[ -n $DEBUG ]] +then + echo "debug:" + echo " REGISTRY: $REGISTRY" + echo " SERVICE: $SERVICE" + echo " COMMIT_SHA: $COMMIT_SHA" + echo " TMP: $TMP" +fi + +echo "docker: logging in" +docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + +echo "docker: pushing image $tag" +DOCKER_BUILDKIT=1 docker push "$tag" +