Skip to content

Commit

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

0 comments on commit 5446bdd

Please sign in to comment.