Initial cloudflared gitops app
Validate manifests / validate (push) Failing after 12s

This commit is contained in:
2026-04-20 01:08:24 +01:00
commit 363d6014f6
18 changed files with 706 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env zsh
set -eu
repo_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
sops_file="${repo_root}/.sops.yaml"
if [ ! -f "${sops_file}" ]; then
exit 0
fi
if command -v yq >/dev/null 2>&1; then
yq -r '.creation_rules[]?.path_regex | select(. != null)' "${sops_file}"
exit 0
fi
if command -v python3 >/dev/null 2>&1; then
python3 - "${sops_file}" <<'PY'
import sys
try:
import yaml
except Exception as exc:
raise SystemExit(f"python3 fallback requires PyYAML: {exc}")
with open(sys.argv[1], "r", encoding="utf-8") as handle:
data = yaml.safe_load(handle) or {}
for rule in data.get("creation_rules") or []:
regex = rule.get("path_regex")
if regex:
print(regex)
PY
exit 0
fi
echo "Unable to read .sops.yaml path_regex values: install yq or python3 with PyYAML" >&2
exit 1