update script

This commit is contained in:
Shinsuke Sugaya 2024-02-10 09:52:32 +09:00
parent 99d941d146
commit 7f12894ad7
2 changed files with 14 additions and 11 deletions

View file

@ -1,23 +1,26 @@
#!/bin/bash
set -xuo pipefail
temp_file=/tmp/fess-build.$$
unzip target/releases/fess-*.zip > ${temp_file} 2>&1
tail ${temp_file}
temp_log_file=/tmp/fess-build.$$
unzip target/releases/fess-*.zip > ${temp_log_file} 2>&1
tail ${temp_log_file}
./fess-*/bin/fess > ${temp_file} 2>&1 &
./fess-*/bin/fess > ${temp_log_file} 2>&1 &
temp_json_file=/tmp/fess-log.$$
touch ${temp_json_file}
error_count=0
while true ; do
status=$(curl -w '%{http_code}\n' -s -o /dev/null "http://localhost:8080/api/v1/health")
status=$(curl -w '%{http_code}\n' -s -o ${temp_json_file} "http://localhost:8080/api/v1/health")
cat ${temp_json_file}
if [[ x"${status}" = x200 ]] ; then
break
else
error_count=$((error_count + 1))
fi
if [[ ${error_count} -ge 180 ]] ; then
if [[ ${error_count} -ge 60 ]] ; then
echo "Fess is not available."
cat ${temp_file} ./fess-*/logs/*.log
cat ${temp_log_file} ./fess-*/logs/*.log
exit 1
fi
sleep 1
@ -27,6 +30,5 @@ pushd /tmp >/dev/null
git clone https://github.com/codelibs/fess-testdata.git
popd >/dev/null
touch $(ls -d ./fess-*/logs)/fess-crawler.log
tail -f ${temp_file} ./fess-*/logs/*.log &
cat ${temp_log_file} ./fess-*/logs/*.log

View file

@ -1,8 +1,9 @@
#!/bin/bash
tail -f ./fess-*/logs/fess-crawler.log &
touch $(ls -d ./fess-*/logs)/fess-crawler.log
tail -f ./fess-*/logs/*.log &
mvn test -P integrationTests -Dtest.fess.url="http://127.0.0.1:8080" -Dtest.search_engine.url="http://127.0.0.1:9201"
mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" --debug
ret=$?
if [ $ret != 0 ] ; then