added push release

This commit is contained in:
2022-08-21 16:42:38 +02:00
parent 0babeff695
commit 0009680eaf
2 changed files with 14 additions and 12 deletions

View File

@@ -2,7 +2,9 @@
echo "building docker image"
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
base_tag="$REGISTRY/$SERVICE"
tag="$base_tag:${COMMIT_SHA:0:10}"
latest_tag="$base_tag:latest"
if [[ -n $DEBUG ]]
then
@@ -13,4 +15,7 @@ then
echo " TMP: $TMP"
fi
DOCKER_BUILDKIT=1 docker build -t "$tag" -f "$TMP/build_release.Dockerfile" .
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
DOCKER_BUILDKIT=1 docker build --cache-from "$latest_tag" -t "$tag" -f "$TMP/build_release.Dockerfile" .
docker tag "$tag" "$latest"