2022-08-11 23:10:39 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-08-11 23:22:12 +02:00
|
|
|
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
|
2022-08-14 20:55:56 +02:00
|
|
|
latest_tag="$REGISTRY/$SERVICE:latest"
|
2022-08-11 23:22:12 +02:00
|
|
|
|
2022-08-13 18:21:08 +02:00
|
|
|
echo "logging in"
|
2022-08-12 00:56:48 +02:00
|
|
|
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
|
|
|
|
2022-08-13 18:21:08 +02:00
|
|
|
echo "building image"
|
2022-08-14 20:55:56 +02:00
|
|
|
DOCKER_BUILDKIT=1 docker build -t "$tag" -t "$latest_tag" -f "$TMP/build_cuddle_image.Dockerfile" .
|
2022-08-13 18:21:08 +02:00
|
|
|
|
|
|
|
echo "pushing image"
|
|
|
|
docker push "$tag"
|
2022-08-14 21:01:02 +02:00
|
|
|
docker push "$latest_tag"
|