Automate policy source freshness and inventory
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 2s

This commit is contained in:
tegwick 2026-08-18 13:25:49 +02:00
parent 78d096bdd5
commit 03a4fab9e0
17 changed files with 1647 additions and 42 deletions

View file

@ -149,8 +149,13 @@ def build(
manifest_path = manifest_path.resolve()
manifest = load_manifest(manifest_path)
as_of = as_of or dt.date.today()
source_root = os.environ.get("POLICY_NEXUS_SOURCE_ROOT")
repository_paths = {
name: (manifest_path.parent / config["path"]).resolve()
name: (
(Path(source_root) / name).resolve()
if source_root
else (manifest_path.parent / config["path"]).resolve()
)
for name, config in manifest["repositories"].items()
}
output_parent = output.resolve().parent
@ -255,6 +260,8 @@ def build(
"lifecycle": lifecycle,
"canonical_path": canonical.as_posix(),
"revision_path": revision_path.as_posix(),
"source_repo": document["source_repo"],
"source_path": document["source_path"],
"source_revision": source_revision,
"source_digest": source_digest,
}