Files
EvoBGP/scripts/validate-remote-speaker-compose.sh
T
DenozordecandCursor 8267141136
CI / changes (push) Successful in 5s
CI / commitlint (push) Skipped
CI / openapi (push) Successful in 38s
CI / web (push) Successful in 55s
CI / go (push) Successful in 1m4s
CI / bird2 (push) Successful in 17s
CI / release (push) Successful in 4m17s
ci(gitea): point registry and remotes at git.shx.one
Перевести CI, semantic-release, bake и compose с git.shts.su на git.shx.one.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 16:43:39 +07:00

43 lines
1.6 KiB
Bash

#!/bin/sh
# Validates docker-compose.remote-speaker.yaml (same gates as CI job go).
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
COMPOSE="$ROOT/deploy/compose/docker-compose.remote-speaker.yaml"
if ! command -v docker >/dev/null 2>&1; then
echo "validate-remote-speaker-compose: docker not found, skipping"
exit 0
fi
if [ ! -f "$COMPOSE" ]; then
echo "validate-remote-speaker-compose: missing $COMPOSE" >&2
exit 1
fi
# Required compose interpolation vars (CI mock values).
export EVOBGP_REGISTRY="${EVOBGP_REGISTRY:-git.shx.one/denozord}"
export EVOBGP_IMAGE_TAG="${EVOBGP_IMAGE_TAG:-latest}"
export EVOBGP_AGENT_SECRET="${EVOBGP_AGENT_SECRET:-ci-test-secret}"
export EVOBGP_CONTROL_PLANE_URL="${EVOBGP_CONTROL_PLANE_URL:-https://cp.example.com}"
export EVOBGP_NODE_TOKEN="${EVOBGP_NODE_TOKEN:-ci-test-token}"
export EVOBGP_SPEAKER_ID="${EVOBGP_SPEAKER_ID:-00000000-0000-0000-0000-000000000001}"
export EVOBGP_BUNDLE_PUBKEY_BASE64="${EVOBGP_BUNDLE_PUBKEY_BASE64:-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=}"
export AGENT_DOMAIN="${AGENT_DOMAIN:-agent.ci.example.com}"
export LETSENCRYPT_EMAIL="${LETSENCRYPT_EMAIL:-ci@example.com}"
export CF_DNS_API_TOKEN="${CF_DNS_API_TOKEN:-ci-token}"
export PANEL_IP_WHITELIST="${PANEL_IP_WHITELIST:-127.0.0.1/32}"
# Optional: merge example env files when present (local/docs parity).
ENV_ARGS=""
for f in \
"$ROOT/deploy/compose/.env.remote-speaker.example" \
"$ROOT/deploy/compose/.env.remote-speaker-tls.example"; do
if [ -f "$f" ]; then
ENV_ARGS="$ENV_ARGS --env-file $f"
fi
done
# shellcheck disable=SC2086
docker compose -f "$COMPOSE" $ENV_ARGS config >/dev/null
echo "validate-remote-speaker-compose: ok"