uncloud-mravi/build.sh
2021-12-05 11:20:01 +01:00

27 lines
492 B
Bash
Executable file

#!/bin/sh
set -x
name=uncloud:$(git describe)
docker build -t ${name} .
# check for args
if [ $# -ge 1 ]; then
target=$1; shift
else
target=""
fi
case "$target" in
dev)
docker tag $name harbor.default.svc.c2.k8s.ooo/ungleich-public/${name}
docker push harbor.default.svc.c2.k8s.ooo/ungleich-public/${name}
;;
"")
echo "Not pushing anywhere"
;;
*)
echo "Unknown argument $target, ignoring"
exit 1
;;
esac