mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-05-20 18:29:32 +00:00
check pod phase instead
This commit is contained in:
parent
df79cb097b
commit
073dc7c408
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@ -317,19 +317,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for test pod to start
|
- name: Wait for test pod to start
|
||||||
run: |
|
run: |
|
||||||
echo "Waiting for job to have an active pod..."
|
echo "Waiting for test pod to reach Running state..."
|
||||||
deadline=$((SECONDS + 120))
|
deadline=$((SECONDS + 300))
|
||||||
while [[ $SECONDS -lt $deadline ]]; do
|
while [[ $SECONDS -lt $deadline ]]; do
|
||||||
active=$(kubectl get job $NAMEPREFIX -n default -o jsonpath='{.status.active}' 2>/dev/null)
|
phase=$(kubectl get pods \
|
||||||
[[ "$active" == "1" ]] && break
|
-l job-name=$NAMEPREFIX \
|
||||||
sleep 5
|
-n default \
|
||||||
|
-o jsonpath='{.items[0].status.phase}' 2>/dev/null)
|
||||||
|
echo "Pod phase: ${phase:-not yet created}"
|
||||||
|
[[ "$phase" == "Running" ]] && break
|
||||||
|
sleep 10
|
||||||
done
|
done
|
||||||
kubectl wait \
|
[[ "$phase" == "Running" ]] || { echo "Timed out waiting for pod to reach Running state"; exit 1; }
|
||||||
--for=condition=Ready \
|
|
||||||
pod \
|
|
||||||
-l job-name=$NAMEPREFIX \
|
|
||||||
-n default \
|
|
||||||
--timeout=300s
|
|
||||||
|
|
||||||
- name: Stream test logs
|
- name: Stream test logs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user