tweaked the ci script and prevented the manage_es fcuntion from returning before it can close the opened groups

This commit is contained in:
Spencer Alger
2014-01-15 01:43:16 -07:00
parent 8e8bb8c63c
commit ce2ff5ff99
3 changed files with 20 additions and 26 deletions

View File

@ -1,9 +1,5 @@
language: node_js
node_js: false
env:
global:
- SAUCE_ACCESS_KEY=3259dd1e-a9f2-41cc-afd7-855d80588aeb
- SAUCE_USERNAME=elasticsearch-js
matrix:
include:
- node_js: "0.8"
@ -11,11 +7,9 @@ matrix:
- node_js: "0.10"
env: ES_BRANCH=master COVERAGE=1
- node_js: "0.10"
env: ES_BRANCH=0.90 NODE_UNIT=0
env: ES_RELEASE=0.90.10 ES_BRANCH=0.90 NODE_UNIT=0
- node_js: "0.10"
env: ES_RELEASE=0.90.9 ES_BRANCH=0.90 NODE_UNIT=0
- node_js: "0.10"
env: ES_RELEASE=0.90.8 ES_BRANCH=0.90 NODE_UNIT=0
# - node_js: "0.10"
# env: NODE_UNIT=0 NODE_INTEGRATION=0 TEST_BROWSER='chrome'
# - node_js: "0.10"

View File

@ -37,7 +37,6 @@ function manage_es {
local PIDS="$ROOT/.snapshots/pids"
group "start:$DO es"
if [ ! -d "$PIDS" ]; then
call mkdir -p $PIDS
fi
@ -82,32 +81,30 @@ function manage_es {
if [ $RUNNING -eq 0 ]; then
echo "Already running $ES_VERSION"
return 1
else
echo "PID file was left behind by ES"
call rm $PIDFILE
fi
fi
./scripts/es.sh install $ES_BRANCH $ES_RELEASE
if [ ! -x "$ES_BIN" ]; then
echo "Unable to find elasticsearch executable"
return 1
fi
elif [ ! -f $PIDFILE ]; then
./scripts/es.sh install $ES_BRANCH $ES_RELEASE
local ES_OPTS="-p $PIDFILE -Des.network.host=localhost -Des.discovery.zen.ping.multicast.enabled=false -Des.discovery.zen.ping_timeout=1"
local ES_OPTS="-p $PIDFILE -Des.network.host=localhost -Des.discovery.zen.ping.multicast.enabled=false -Des.discovery.zen.ping_timeout=1"
if [ -n "$ES_NODE_NAME" ]; then
ES_OPTS="$ES_OPTS -Des.node.name=$ES_NODE_NAME"
fi
if [ -n "$ES_NODE_NAME" ]; then
ES_OPTS="$ES_OPTS -Des.node.name=$ES_NODE_NAME"
fi
if [ "$ES_BRANCH" = "0.90" ]; then
echo "Starting Elasticsearch $ES_VERSION"
call $ES_BIN $ES_OPTS
else
echo "Starting Elasticsearch $ES_VERSION as a deamon"
call $ES_BIN -d $ES_OPTS
if [ "$ES_BRANCH" = "0.90" ]; then
echo "Starting Elasticsearch $ES_VERSION"
call $ES_BIN $ES_OPTS
else
echo "Starting Elasticsearch $ES_VERSION as a deamon"
call $ES_BIN -d $ES_OPTS
fi
fi
;;
stop)
@ -119,13 +116,14 @@ function manage_es {
if [ $RUNNING -eq 0 ]; then
kill $PID
echo "Elasticsearch $ES_VERSION stopped"
return 0
else
echo "PID file was left behind by ES"
fi
rm $PIDFILE
else
echo "Elasticsearch $ES_VERSION is not running."
fi
echo "Elasticsearch $ES_VERSION is not running."
return 1
;;
esac
group "end:$DO es"

View File

@ -17,6 +17,8 @@
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ES_NODE_NAME="elasticsearch_js_test_runner"
SAUCE_ACCESS_KEY="3259dd1e-a9f2-41cc-afd7-855d80588aeb"
SAUCE_USERNAME="elasticsearch-js"
source $HERE/_utils.sh