uncloud-mravi/build.sh

34 lines
628 B
Bash
Raw Normal View History

2021-12-05 10:20:01 +00:00
#!/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)
2021-12-18 21:13:16 +00:00
url=harbor.default.svc.c2.k8s.ooo/ungleich-public
docker tag $name ${url}/${name}
docker push ${url}/${name}
;;
prod)
url=harbor.ungleich.svc.p10.k8s.ooo/ungleich-public
docker tag $name ${url}/${name}
docker push ${url}/${name}
2021-12-05 10:20:01 +00:00
;;
"")
echo "Not pushing anywhere"
;;
*)
echo "Unknown argument $target, ignoring"
exit 1
;;
esac