Skip to content

Commit

Permalink
adding while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
gzukel committed Mar 26, 2024
1 parent 6f49cb2 commit fea5733
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/execute_advanced_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ jobs:
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id)
if [ -z "$current_status" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
Expand Down Expand Up @@ -79,8 +81,10 @@ jobs:
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id)
if [ -z "$current_status" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
Expand Down Expand Up @@ -114,8 +118,10 @@ jobs:
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id)
if [ -z "$current_status" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
Expand Down Expand Up @@ -149,8 +155,10 @@ jobs:
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id)
if [ -z "$current_status" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
Expand All @@ -159,4 +167,4 @@ jobs:
docker logs $container_id || echo "no logs"
fi
sleep 5
done
done

0 comments on commit fea5733

Please sign in to comment.