From 0d7f10776c3c0ec0b4b1aaa82a07bddf45169071 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 17 Feb 2024 20:49:31 +0900 Subject: [PATCH] [docker] push if build is ok --- build-image.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-image.sh b/build-image.sh index acfb789a..0ac898ed 100755 --- a/build-image.sh +++ b/build-image.sh @@ -2,6 +2,7 @@ if [ $# -lt 1 ]; then echo "$0 imageversion [push]" + echo "Version could be: $(git describe --always)" echo "If push is specified, also push to our harbor" exit 1 fi @@ -11,4 +12,7 @@ version=$1; shift tag=${tagprefix}:${version} +set -ex + docker build -t "${tag}" . +docker push "${tag}"