chore: sync workspace — configs, docs, scripts, CI, pnpm, submodules
- Submodule pins: dbis_core, cross-chain-pmm-lps, mcp-proxmox (local, push may be pending), metamask-integration, smom-dbis-138 - Atomic swap + cross-chain-pmm-lops-publish, deploy-portal workflow, phoenix deploy-targets, routing/aggregator matrices - Docs, token-lists, forge proxy, phoenix API, runbooks, verify scripts Made-with: Cursor
This commit is contained in:
@@ -132,6 +132,23 @@ else
|
||||
log_err "Missing config/public-sector-program-manifest.json"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
# Phoenix deploy targets (used by phoenix-deploy-api POST /api/deploy)
|
||||
if [[ -f "$PROJECT_ROOT/phoenix-deploy-api/deploy-targets.json" ]]; then
|
||||
log_ok "Found: phoenix-deploy-api/deploy-targets.json"
|
||||
if [[ -x "$PROJECT_ROOT/scripts/validation/validate-phoenix-deploy-targets.sh" ]]; then
|
||||
if "$PROJECT_ROOT/scripts/validation/validate-phoenix-deploy-targets.sh" "$PROJECT_ROOT/phoenix-deploy-api/deploy-targets.json" >/dev/null; then
|
||||
log_ok "phoenix-deploy-api/deploy-targets.json: repo/branch/target map valid"
|
||||
else
|
||||
log_err "phoenix-deploy-api/deploy-targets.json: invalid structure"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
else
|
||||
log_warn "validate-phoenix-deploy-targets.sh not executable; skipping deploy target validation"
|
||||
fi
|
||||
else
|
||||
log_err "Missing phoenix-deploy-api/deploy-targets.json"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
# Proxmox operational template (VMID/IP/FQDN mirror; see docs/03-deployment/PROXMOX_VE_OPERATIONAL_DEPLOYMENT_TEMPLATE.md)
|
||||
if [[ -f "$PROJECT_ROOT/config/proxmox-operational-template.json" ]]; then
|
||||
log_ok "Found: config/proxmox-operational-template.json"
|
||||
|
||||
48
scripts/validation/validate-phoenix-deploy-targets.sh
Executable file
48
scripts/validation/validate-phoenix-deploy-targets.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
# Validate phoenix-deploy-api/deploy-targets.json structure.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
TARGETS_FILE="${1:-$PROJECT_ROOT/phoenix-deploy-api/deploy-targets.json}"
|
||||
|
||||
if [[ ! -f "$TARGETS_FILE" ]]; then
|
||||
echo "[ERROR] Missing deploy targets file: $TARGETS_FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v jq >/dev/null 2>&1; then
|
||||
echo "[ERROR] jq is required to validate $TARGETS_FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
jq -e '
|
||||
(.targets | type == "array")
|
||||
and (.targets | length > 0)
|
||||
and all(.targets[]; (
|
||||
(.repo | type == "string" and length > 0)
|
||||
and ((.branch // "main") | type == "string" and length > 0)
|
||||
and ((.target // "default") | type == "string" and length > 0)
|
||||
and (.cwd | type == "string" and length > 0)
|
||||
and (.command | type == "array" and length > 0)
|
||||
and (all(.command[]; type == "string" and length > 0))
|
||||
and ((.required_env // []) | type == "array")
|
||||
and (all((.required_env // [])[]?; type == "string" and length > 0))
|
||||
and (
|
||||
(.healthcheck // null) == null or (
|
||||
(.healthcheck.url | type == "string" and length > 0)
|
||||
and ((.healthcheck.expect_status // 200) | type == "number")
|
||||
and ((.healthcheck.attempts // 1) | type == "number")
|
||||
and ((.healthcheck.delay_ms // 0) | type == "number")
|
||||
and ((.healthcheck.timeout_ms // 10000) | type == "number")
|
||||
)
|
||||
)
|
||||
))
|
||||
and (
|
||||
[.targets[] | [(.repo), (.branch // "main"), (.target // "default")] | join("|")]
|
||||
| length == (unique | length)
|
||||
)
|
||||
' "$TARGETS_FILE" >/dev/null
|
||||
|
||||
echo "[OK] phoenix deploy targets valid: $TARGETS_FILE"
|
||||
Reference in New Issue
Block a user