solution
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-27 16:42:18 +03:00
parent 20afc2c790
commit a884c07867
133 changed files with 27001 additions and 120 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
# Ожидание HTTPS readiness через Traefik с проверкойCA. --insecure не используется.
set -eu
export MSYS_NO_PATHCONV=1
export MSYS2_ARG_CONV_EXCL="*"
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$ROOT"
URL="${READY_URL:-https://localhost:8443/health/ready}"
# Относительный путь понимают и Linux curl, и Windows schannel curl.
CA="${CA_FILE:-certs/ca.crt}"
LIMIT="${READY_TIMEOUT_SECONDS:-180}"
# Windows schannel не умеет проверять revocation локального CA без CRL;
# отключаем только проверку revocation, но не проверку цепочки/hostname.
CURL_OPTS=""
case "$(uname -s 2>/dev/null || true)" in
MINGW*|MSYS*|CYGWIN*) CURL_OPTS="--ssl-no-revoke" ;;
esac
i=0
while [ "$i" -lt "$LIMIT" ]; do
if curl $CURL_OPTS -fsS --cacert "$CA" "$URL" >/dev/null 2>&1; then
printf 'ready: %s\n' "$URL"
exit 0
fi
i=$((i + 1))
sleep 1
done
printf 'not ready after %ss: %s\n' "$LIMIT" "$URL" >&2
exit 1