Skip to content

Commit

Permalink
OPSEXP-2445 Less verbose output in verify-compose action (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Jan 22, 2024
1 parent 5799b05 commit a1b63b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions .github/actions/dbp-charts/verify-compose/docker_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ docker-compose --version
docker-compose -f "${COMPOSE_FILE}" config
echo "Starting Alfresco in docker compose"
docker-compose ps
docker-compose -f "${COMPOSE_FILE}" pull
docker-compose -f "${COMPOSE_FILE}" pull --quiet
export COMPOSE_HTTP_TIMEOUT=120
docker-compose -f "${COMPOSE_FILE}" up -d
docker-compose -f "${COMPOSE_FILE}" up -d --quiet-pull

WAIT_INTERVAL=1
COUNTER=0
TIMEOUT=300
t0=$(date +%s)
echo "Waiting for alfresco to start"
response=$(curl --write-out %{http_code} --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/ || true)
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/ || true)
until [[ "200" -eq "${response}" ]] || [[ "${COUNTER}" -eq "${TIMEOUT}" ]]; do
printf '.'
sleep "${WAIT_INTERVAL}"
COUNTER=$((COUNTER + WAIT_INTERVAL))
response=$(curl --write-out %{http_code} --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/ || true)
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/ || true)
done
if (("${COUNTER}" < "${TIMEOUT}")); then
t1=$(date +%s)
Expand All @@ -38,14 +39,15 @@ else
echo "The last response code from /alfresco/ was ${response}"
exit 1
fi

COUNTER=0
echo "Waiting for share to start"
response=$(curl --write-out %{http_code} --output /dev/null --silent http://localhost:8080/share/page || true)
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:8080/share/page || true)
until [[ "200" -eq "${response}" ]] || [[ "${COUNTER}" -eq "${TIMEOUT}" ]]; do
printf '.'
sleep "${WAIT_INTERVAL}"
COUNTER=$((COUNTER + WAIT_INTERVAL))
response=$(curl --write-out %{http_code} --output /dev/null --silent http://localhost:8080/share/page || true)
response=$(curl --write-out '%{http_code}' --output /dev/null --silent http://localhost:8080/share/page || true)
done
if (("${COUNTER}" < "${TIMEOUT}")); then
t1=$(date +%s)
Expand All @@ -57,15 +59,16 @@ else
echo "The last response code from /share/ was ${response}"
exit 1
fi

COUNTER=0
TIMEOUT=20
echo "Waiting more time for SOLR"
response=$(curl --write-out %{http_code} --user admin:admin --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/s/api/solrstats || true)
response=$(curl --write-out '%{http_code}' --user admin:admin --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/s/api/solrstats || true)
until [[ "200" -eq "${response}" ]] || [[ "${COUNTER}" -eq "${TIMEOUT}" ]]; do
printf '.'
sleep "${WAIT_INTERVAL}"
COUNTER=$((COUNTER + WAIT_INTERVAL))
response=$(curl --write-out %{http_code} --user admin:admin --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/s/api/solrstats || true)
response=$(curl --write-out '%{http_code}' --user admin:admin --output /dev/null --silent http://localhost:"${alf_port}"/alfresco/s/api/solrstats || true)
done

cd ..
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.12.0
v5.13.0

0 comments on commit a1b63b3

Please sign in to comment.