Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Apr 8, 2018
1 parent a861277 commit 4399893
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions build_or_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,11 @@ function getversion {
python -c 'from jiveapi.version import VERSION; print(VERSION)'
}

function dockerbuild {
function dockertoxbuild {
tag=$(gettag)
version=$(getversion)
echo "Building Docker image..."
if [ ! -z "$TOXDISTDIR" ]; then
cp "${TOXDISTDIR}/jiveapi-${version}.zip" jiveapi.zip
else
pythonbuild
cp "dist/jiveapi-${version}.zip" jiveapi.zip
fi
cp "${TOXDISTDIR}/jiveapi-${version}.zip" jiveapi.zip
docker build --build-arg version="$tag" --build-arg jiveapi_version="$version" --no-cache -t "jantman/jiveapi:${tag}" .
echo "Built image and tagged as: jantman/jiveapi:${tag}"
}
Expand All @@ -94,10 +89,10 @@ function pythonpush {
}

if [[ "$1" == "build" ]]; then
dockerbuild
tox -r docker
pythonbuild
elif [[ "$1" == "dockerbuild" ]]; then
dockerbuild
dockertoxbuild
elif [[ "$1" == "push" ]]; then
dockerpush
pythonpush
Expand Down

0 comments on commit 4399893

Please sign in to comment.