update build.sh
This commit is contained in:
parent
e8609561b3
commit
6de16ffd27
1 changed files with 8 additions and 3 deletions
11
build.sh
11
build.sh
|
@ -2,15 +2,20 @@
|
|||
|
||||
set -exu
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "$0 <container> <version>" >&2
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "$0 <container> <version> [push]" >&2
|
||||
exit 1
|
||||
fi
|
||||
container=$1; shift
|
||||
version=$1; shift
|
||||
|
||||
name=harbor.k8s.ungleich.ch:ungleich-public/${container}
|
||||
name=harbor.k8s.ungleich.ch/ungleich-public/${container}
|
||||
|
||||
tag=${name}:${version}
|
||||
|
||||
cd $container
|
||||
docker build -t ${tag} .
|
||||
|
||||
if [ "$#" -ge 1 ]; then
|
||||
docker push ${tag}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue