scripts: deployment, NPM, verify, validation, env loader, operator helpers
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Made-with: Cursor
This commit is contained in:
@@ -112,6 +112,48 @@ else
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
fi
|
||||
# Public-sector program manifest (served by phoenix-deploy-api GET /api/v1/public-sector/programs)
|
||||
if [[ -f "$PROJECT_ROOT/config/public-sector-program-manifest.json" ]]; then
|
||||
log_ok "Found: config/public-sector-program-manifest.json"
|
||||
if command -v jq &>/dev/null; then
|
||||
if jq -e '
|
||||
(.schemaVersion | type == "string")
|
||||
and (.programs | type == "array")
|
||||
and (.programs | length > 0)
|
||||
and ((.programs | map(.id) | unique | length) == (.programs | length))
|
||||
' "$PROJECT_ROOT/config/public-sector-program-manifest.json" &>/dev/null; then
|
||||
log_ok "public-sector-program-manifest.json: schemaVersion, programs[], unique .id"
|
||||
else
|
||||
log_err "public-sector-program-manifest.json: invalid structure or duplicate program ids"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
fi
|
||||
else
|
||||
log_err "Missing config/public-sector-program-manifest.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"
|
||||
if command -v jq &>/dev/null; then
|
||||
if jq -e '
|
||||
(.schemaVersion | type == "string")
|
||||
and (.network.management_lan.gateway | type == "string")
|
||||
and (.proxmox_nodes | type == "array")
|
||||
and (.proxmox_nodes | length >= 1)
|
||||
and (.services | type == "array")
|
||||
and (.services | length >= 1)
|
||||
' "$PROJECT_ROOT/config/proxmox-operational-template.json" &>/dev/null; then
|
||||
log_ok "proxmox-operational-template.json: schema, network, nodes, services"
|
||||
else
|
||||
log_err "proxmox-operational-template.json: invalid top-level structure"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
fi
|
||||
else
|
||||
log_err "Missing config/proxmox-operational-template.json"
|
||||
ERRORS=$((ERRORS + 1))
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$OPTIONAL_ENV" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user