forked from uncloud/uncloud
Add build script
This commit is contained in:
parent
6ef3c0d016
commit
07d7f5e4ae
1 changed files with 27 additions and 0 deletions
27
build.sh
Executable file
27
build.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/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
|
Loading…
Reference in a new issue