Add build script.

This commit is contained in:
2023-03-09 16:22:31 -05:00
parent 39875585ef
commit fe2c400a2a
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash -x
# this file is intended to build the docker image and push to the correct repository. Intended to be run by my buildbot instance.
# first just build, tag, and push
docker build -t viker.cheezers.net:5000/agon:latest .
docker push viker.cheezers.net:5000/agon:latest
# check if there is a git tag. if so, tag with that tag and push again
# expecting tag to be 6 characters long. otherwise isn't not the right tag
GITTAG=$(git describe --tags)
length=${#GITTAG}
if [ $length -eq 6 ]; then
docker build -t viker.cheezers.net:5000/agon:$GITTAG .
docker push viker.cheezers.net:5000/agon:$GITTAG
fi