Skip to content

Commit

Permalink
wait for router
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Aug 22, 2024
1 parent 6d7b9b2 commit 3df0527
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/test-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,16 @@ jobs:
sudo systemctl start ziti-router.service
sudo systemd-run --wait --quiet --service-type=oneshot --property=TimeoutStartSec=20s systemctl is-active ziti-router.service
if [[ $(ziti edge list edge-routers -j | jq '.data[0].isOnline') == "true" ]]
_router_online_cmd="[[ $(ziti edge list edge-routers -j | jq '.data[0].isOnline') == "true" ]]"
ATTEMPTS=10
DELAY=3
until !((ATTEMPTS)) || ${_router_online_cmd}
do
(( ATTEMPTS-- ))
echo "Waiting for router to be online"
sleep ${DELAY}
done
if ${_router_online_cmd}
then
echo "Router is online"
exit 0
Expand Down

0 comments on commit 3df0527

Please sign in to comment.