25 lines
747 B
Bash
Executable File
25 lines
747 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
docker build -t ungleich-hardware .
|
|
|
|
while [ $# -ge 1 ]; do
|
|
tag=$1; shift
|
|
# Does the tag exist?
|
|
if git rev-list "$tag" 2>/dev/null; then
|
|
cur=$(git describe)
|
|
if [ $cur != $tag ]; then
|
|
echo "Requested build for $tag, but we are on $cur, aborting"
|
|
exit 1
|
|
fi
|
|
else
|
|
git tag -a -m "Version $tag" $tag
|
|
git push --tags
|
|
fi
|
|
docker tag ungleich-hardware:latest ungleich/ungleich-hardware:${tag}
|
|
docker tag ungleich-hardware:latest harbor.ungleich.svc.p10.k8s.ooo/ungleich-public/ungleich-hardware:${tag}
|
|
docker push ungleich/ungleich-hardware:${tag}
|
|
docker push harbor.ungleich.svc.p10.k8s.ooo/ungleich-public/ungleich-hardware:${tag}
|
|
done
|