mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +00:00
The changes include the following: * The python scripts for e2e environment creation were moved to this code base * Mirror to community * Docker image check * Unit, integration and e2e tests * "Snapshots": "latest" docker image from master in quay.io, docker images for "release" branches to quay.io, "master" and * "release" branches snapshots to nexus * Releases: nexus, s3 staging bucket, quay.io and dockerhub * Fix for https://issues.alfresco.com/jira/browse/SEARCH-2389 The build is using branches only.
32 lines
861 B
Bash
Executable File
32 lines
861 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e # exit if commands fails
|
|
set -x # trace what gets exe
|
|
|
|
WAIT_INTERVAL=1
|
|
COUNTER=0
|
|
TIMEOUT=2000
|
|
t0=`date +%s`
|
|
|
|
declare -a endpoints=("${1:-http://localhost:8081/alfresco/}" "${1:-http://localhost:8083/solr/}")
|
|
|
|
for endpoint in "${endpoints[@]}"
|
|
do
|
|
|
|
echo "Waiting for Service to start using endpoint: ${endpoint}"
|
|
|
|
until [[ "$(curl --output /dev/null -w ''%{http_code}'' --silent --head --fail ${endpoint})" == 200 ]] || [ "$COUNTER" -eq "$TIMEOUT" ]; do
|
|
printf '.'
|
|
sleep $WAIT_INTERVAL
|
|
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
|
|
done
|
|
|
|
if (("$COUNTER" < "$TIMEOUT")) ; then
|
|
t1=`date +%s`
|
|
delta=$((($t1 - $t0)/60))
|
|
echo "Service ${endpoint} Started in $delta minutes"
|
|
else
|
|
echo "Service ${endpoint} could not start in time."
|
|
echo "Waited $COUNTER seconds"
|
|
exit 1
|
|
fi
|
|
done |