This is an automated email from the ASF dual-hosted git repository. dmeikle pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tika-docker.git
commit 12432453246979dd8ffabac8563ac9b4f1f914c9 Author: David Meikle <[email protected]> AuthorDate: Mon Feb 3 17:56:39 2020 +0000 Updated to support publish and error on failed test --- docker-tool.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docker-tool.sh b/docker-tool.sh index 39e02c3..9386b83 100755 --- a/docker-tool.sh +++ b/docker-tool.sh @@ -38,8 +38,15 @@ test_docker_image() { docker run -d --name "$1" -p 9998:9998 apache/tika:"$1" sleep 10 curl http://localhost:9998/version - docker kill "$1" - docker rm "$1" + if [ $? -eq 0 ] + then + docker kill "$1" + docker rm "$1" + else + docker kill "$1" + docker rm "$1" + exit 1 + fi } shift $((OPTIND -1)) @@ -55,14 +62,15 @@ case "$subcommand" in ;; test) - # Test minimal image + # Test the images test_docker_image ${version} - # Test full image test_docker_image "${version}-full" ;; publish) - echo "Does nothing until we get Docker Hub access setup under Apache Organisation" + # Push the build images + docker push apache/tika:${version} + docker push apache/tika:${version}-full ;; esac
