Skip to content

Commit

Permalink
added a while loop in the workflow to know when the pod is ready: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
giladAlboher committed Jan 27, 2024
1 parent c46be9a commit ce24505
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ jobs:
- name: Wait for Pods to be running
run: |
SECONDS=0
TIMEOUT=600 # Set your desired timeout in seconds here
while [[ $(kubectl get pods -n project -l app=project -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do
TIMEOUT=60 # Set your desired timeout in seconds here
while [[ $(kubectl get pods -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do
if [[ $SECONDS -gt $TIMEOUT ]]; then
echo "Timed out waiting for pods to be ready"
exit 1
fi
kubectl get pods -n project
kubectl get pods
sleep 1
done
Expand Down

0 comments on commit ce24505

Please sign in to comment.