Files
proxmox/scripts/omnl/validate-rail.sh
defiQUG 95522d3bca
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
feat(omnl): HYBX-BATCH-001 package, rail scripts, regulatory docs, CI
- Add OMNL/CBK Indonesia submission and audit binder docs, manifests, attestations
- Add scripts/omnl transaction-package pipeline, LEI/PvP helpers, jq/lib fixtures
- Update entity master data, MASTER_INDEX, TODOS, dbis-rail docs and rulebook
- Add proof_package/regulatory skeleton and transaction package zip + snapshot JSON
- validate-omnl-rail workflow, forge-verification-proxy tweak, .gitignore hygiene
- Bump smom-dbis-138 (cronos verify docs/scripts) and explorer-monorepo (SPA + env report)

Made-with: Cursor
2026-03-24 18:11:36 -07:00

66 lines
2.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# OMNL operator rail CI: .gitignore check, shellcheck on scripts (if available), resolve_ids parse check.
# Usage: from repo root. Exit 0 if all pass.
set -euo pipefail
REPO_ROOT="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
cd "$REPO_ROOT"
fail=0
# 1) .gitignore must include ids.env and reconciliation/
if ! grep -q 'ids\.env' .gitignore 2>/dev/null; then
echo "FAIL: .gitignore missing ids.env" >&2
fail=1
fi
if ! grep -q 'reconciliation' .gitignore 2>/dev/null; then
echo "FAIL: .gitignore missing reconciliation/" >&2
fail=1
fi
[ $fail -eq 0 ] && echo "PASS: .gitignore has ids.env and reconciliation/" >&2
# 2) resolve_ids.sh must handle both array and pageItems (grep for pattern)
if ! grep -q 'pageItems' scripts/omnl/resolve_ids.sh 2>/dev/null; then
echo "WARN: resolve_ids.sh may not handle pageItems response" >&2
fi
if ! grep -q 'if type == "array"' scripts/omnl/resolve_ids.sh 2>/dev/null; then
echo "WARN: resolve_ids.sh may not normalize array" >&2
fi
# 3) Shellcheck (optional)
if command -v shellcheck >/dev/null 2>&1; then
for f in scripts/omnl/*.sh; do
[ -f "$f" ] && shellcheck -x "$f" 2>/dev/null || true
done
echo "PASS: shellcheck completed" >&2
else
echo "SKIP: shellcheck not installed" >&2
fi
if command -v python3 >/dev/null 2>&1; then
python3 -m py_compile \
scripts/omnl/generate-transaction-package-evidence.py \
scripts/omnl/verify-transaction-package-commitment.py 2>/dev/null \
&& echo "PASS: py_compile transaction-package scripts" >&2 \
|| { echo "FAIL: py_compile transaction-package scripts" >&2; fail=1; }
else
echo "SKIP: python3 not installed" >&2
fi
for sh in \
scripts/omnl/build-transaction-package-zip.sh \
scripts/omnl/patch-attestation-subreg-pdf-hashes.sh \
scripts/omnl/apply-qes-tsa-to-staging.sh \
scripts/omnl/check-transaction-package-4995-readiness.sh \
scripts/omnl/omnl-transaction-package-snapshot.sh \
scripts/omnl/omnl-pvp-post-clearing-bank-kanaya.sh \
scripts/omnl/omnl-office-create-bank-kanaya.sh \
scripts/omnl/run-transaction-package-ci-smoke.sh
do
if [ -f "$sh" ]; then
bash -n "$sh" 2>/dev/null && echo "PASS: bash -n $sh" >&2 || { echo "FAIL: bash -n $sh" >&2; fail=1; }
fi
done
exit $fail