aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2018-04-03 20:33:49 +0200
committerMartin Stockhammer <martin_s@apache.org>2018-04-03 20:46:56 +0200
commitff44bab792386b02b372fd6612d6c95a1a74cac8 (patch)
tree2d42d049cb0a9f5c2439e4ab5aba4f920280d90b
parenta2febcecd9aba01d5903525dbe32926866513e58 (diff)
downloadarchiva-ff44bab792386b02b372fd6612d6c95a1a74cac8.tar.gz
archiva-ff44bab792386b02b372fd6612d6c95a1a74cac8.zip
Adding additional output for docker script
-rwxr-xr-x[-rw-r--r--]src/ci/scripts/container_webtest.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ci/scripts/container_webtest.sh b/src/ci/scripts/container_webtest.sh
index b80845598..90dbc45be 100644..100755
--- a/src/ci/scripts/container_webtest.sh
+++ b/src/ci/scripts/container_webtest.sh
@@ -61,6 +61,7 @@ function stop_instance() {
function start_instance() {
echo "Starting container ${INSTANCE_NAME}"
+ echo "ARGS: -d -e SCREEN_WIDTH=${SCREEN_WIDTH} -e SCREEN_HEIGHT=${SCREEN_HEIGHT} --net=${NETWORK_TYPE} -p ${PORT_MAPPING} --name ${INSTANCE_NAME} ${TAG}"
docker run -d -e "SCREEN_WIDTH=${SCREEN_WIDTH}" -e "SCREEN_HEIGHT=${SCREEN_HEIGHT}" --net="${NETWORK_TYPE}" -p "${PORT_MAPPING}" --name "${INSTANCE_NAME}" "${TAG}"
}
@@ -90,7 +91,21 @@ if [ "${START_ARG}" == "start" ]; then
stop_instance
# Starting
start_instance
+ if [ $? -ne 0 ]; then
+ echo "Error from docker run"
+ fi
+ docker ps
+ TIMEOUT=20
+ RES=1
+ while [ $RES -gt 0 -a $TIMEOUT -gt 0 ]; do
+ sleep 0.2
+ TIMEOUT=$((TIMEOUT-1))
+ docker logs "${INSTANCE_NAME}" | tail -5 | grep -q "Selenium Server is up and running"
+ RES=$?
+ done
+ docker logs "${INSTANCE_NAME}"
elif [ "${START_ARG}" == "stop" ]; then
+ docker logs "${INSTANCE_NAME}"
stop_instance
else
print_usage