wait for pod
This commit is contained in:
@ -8,6 +8,14 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- run: |
|
- run: |
|
||||||
curl -s https://gitea.vecus.ru/ci/postgres-actions/raw/branch/master/.gitea/actions/create/postgres-template.yaml | envsubst | werf kubectl apply -f -
|
curl -s https://gitea.vecus.ru/ci/postgres-actions/raw/branch/master/.gitea/actions/create/postgres-template.yaml | envsubst | werf kubectl apply -f -
|
||||||
|
echo "Waiting for pod to be ready..."
|
||||||
|
timeout=60
|
||||||
|
while ! werf kubectl get pod ${POD_NAME} -o jsonpath='{.status.containerStatuses[0].ready}' 2>/dev/null | grep -q true; do
|
||||||
|
echo "Still not ready..."
|
||||||
|
sleep 2
|
||||||
|
timeout=$((timeout - 2))
|
||||||
|
[ $timeout -le 0 ] && echo "Timeout waiting for pod" && exit 1
|
||||||
|
done
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
POD_NAME: ${{ inputs.service_name }}
|
POD_NAME: ${{ inputs.service_name }}
|
||||||
|
|||||||
Reference in New Issue
Block a user