Some checks are pending
CI/CD Pipeline with Secure Ephemeral PiP / test-backend (push) Waiting to run
CI/CD Pipeline with Secure Ephemeral PiP / test-frontend (push) Blocked by required conditions
CI/CD Pipeline with Secure Ephemeral PiP / build-backend (push) Blocked by required conditions
CI/CD Pipeline with Secure Ephemeral PiP / build-frontend (push) Blocked by required conditions
CI/CD Pipeline with Secure Ephemeral PiP / cleanup (push) Blocked by required conditions
30 lines
No EOL
761 B
Bash
Executable file
30 lines
No EOL
761 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
RUN_ID="${RUN_ID:-${GITHUB_RUN_ID:-local}}"
|
|
PIP_NAME="${PIP_NAME:-ci-pip-${RUN_ID}}"
|
|
TIMEOUT="${TIMEOUT:-30}"
|
|
SLEEP="${SLEEP:-2}"
|
|
|
|
echo "Probing PiP readiness for ${PIP_NAME} (up to ${TIMEOUT}s)..."
|
|
|
|
if ! podman inspect "$PIP_NAME" >/dev/null 2>&1; then
|
|
echo "ERROR: ${PIP_NAME} not found." >&2
|
|
exit 1
|
|
fi
|
|
|
|
end=$((SECONDS + TIMEOUT))
|
|
while (( SECONDS < end )); do
|
|
if podman exec "$PIP_NAME" podman version >/dev/null 2>&1 \
|
|
&& podman exec "$PIP_NAME" podman info >/dev/null 2>&1; then
|
|
echo "PiP readiness OK."
|
|
exit 0
|
|
fi
|
|
sleep "$SLEEP"
|
|
done
|
|
|
|
echo "ERROR: PiP not ready. Diagnostics:" >&2
|
|
podman ps >&2 || true
|
|
podman logs "$PIP_NAME" >&2 || true
|
|
podman exec "$PIP_NAME" podman info >&2 || true
|
|
exit 1 |