[docker] push if build is ok
This commit is contained in:
parent
4eb470df16
commit
0d7f10776c
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
echo "$0 imageversion [push]"
|
echo "$0 imageversion [push]"
|
||||||
|
echo "Version could be: $(git describe --always)"
|
||||||
echo "If push is specified, also push to our harbor"
|
echo "If push is specified, also push to our harbor"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -11,4 +12,7 @@ version=$1; shift
|
||||||
|
|
||||||
tag=${tagprefix}:${version}
|
tag=${tagprefix}:${version}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
docker build -t "${tag}" .
|
docker build -t "${tag}" .
|
||||||
|
docker push "${tag}"
|
||||||
|
|
Loading…
Reference in a new issue