added push release
This commit is contained in:
parent
0babeff695
commit
0009680eaf
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
echo "building docker image"
|
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 ]]
|
if [[ -n $DEBUG ]]
|
||||||
then
|
then
|
||||||
@ -13,4 +15,7 @@ then
|
|||||||
echo " TMP: $TMP"
|
echo " TMP: $TMP"
|
||||||
fi
|
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"
|
||||||
|
@ -2,20 +2,17 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
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 ]]
|
export DOCKER_BUILDKIT=1
|
||||||
then
|
|
||||||
echo "debug:"
|
|
||||||
echo " REGISTRY: $REGISTRY"
|
|
||||||
echo " SERVICE: $SERVICE"
|
|
||||||
echo " COMMIT_SHA: $COMMIT_SHA"
|
|
||||||
echo " TMP: $TMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "docker: logging in"
|
echo "docker: logging in"
|
||||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||||
|
|
||||||
echo "docker: pushing image $tag"
|
echo "docker: pushing image $tag"
|
||||||
DOCKER_BUILDKIT=1 docker push "$tag"
|
docker push "$tag" &
|
||||||
|
docker push "$latest_tag" &
|
||||||
|
wait
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user