Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrupp committed Jul 20, 2021
1 parent 99cc386 commit 4f14875
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions start-splice-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ function _wait_for_port
echo -n " "
counter=0
until is_port_open localhost ${port}; do
echo -n "${counter} - "
if [ ${JENKINS_MODE} ]; then
echo "${msg} ${counter}"
else
echo -n "${counter} - "
fi
counter=$((counter+1))

if [ ${counter} -ge ${wait_max} ]; then
Expand Down Expand Up @@ -213,13 +217,17 @@ function _wait_for_master {
echo -n " "
counter=0
until is_port_open localhost ${port}; do
echo -n "${counter} - "
if [ ${JENKINS_MODE} ]; then
echo "${msg} ${counter}"
else
echo -n "${counter} - "
fi
counter=$((counter+1))
if [ ${counter} -ge ${wait_max} ]; then
echo "Waited too long, aborting."
exit 2
fi
if cat ${SPLICE_LOG} | grep "[ERROR] Failed to execute goal" ; then
if cat ${SPLICE_LOG} | grep "\[ERROR\] Failed to execute goal" ; then
echo "ERROR: Spliceengine couldn't start."
exit 2
fi
Expand Down Expand Up @@ -290,6 +298,7 @@ function usage
echo " -K like k, but will also reset database to clean. Needs some rebuild afterwards (use -l)."
echo " -T <n> use -T <n> with maven (build with n threads)."
echo " -h => print this message"
echo " -L use linefeeds when waiting (jenkins mode)"
}

function verify_profiles
Expand All @@ -313,7 +322,7 @@ function verify_profiles
done
}

while getopts "chkp:s:bld:fT:Ke" flag ; do
while getopts "chkp:s:bld:fT:KeL" flag ; do
case $flag in
h* | \?)
usage
Expand Down Expand Up @@ -366,6 +375,9 @@ while getopts "chkp:s:bld:fT:Ke" flag ; do
# number of threads
MVN_THREADS="-T ${OPTARG}"
;;
L)
JENKINS_MODE=1
;;
e)
# enterprise edition
ENTERPRISE_EDITION=1
Expand Down

0 comments on commit 4f14875

Please sign in to comment.