Isolate fetched source override from tests
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 42s
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 42s
This commit is contained in:
parent
e33b98a1e6
commit
e7b26ff158
1 changed files with 6 additions and 6 deletions
|
|
@ -150,14 +150,14 @@ def build(
|
||||||
manifest = load_manifest(manifest_path)
|
manifest = load_manifest(manifest_path)
|
||||||
as_of = as_of or dt.date.today()
|
as_of = as_of or dt.date.today()
|
||||||
source_root = os.environ.get("POLICY_NEXUS_SOURCE_ROOT")
|
source_root = os.environ.get("POLICY_NEXUS_SOURCE_ROOT")
|
||||||
repository_paths = {
|
repository_paths = {}
|
||||||
name: (
|
for name, config in manifest["repositories"].items():
|
||||||
(Path(source_root) / name).resolve()
|
fetched = (Path(source_root) / name).resolve() if source_root else None
|
||||||
if source_root
|
repository_paths[name] = (
|
||||||
|
fetched
|
||||||
|
if fetched is not None and fetched.is_dir()
|
||||||
else (manifest_path.parent / config["path"]).resolve()
|
else (manifest_path.parent / config["path"]).resolve()
|
||||||
)
|
)
|
||||||
for name, config in manifest["repositories"].items()
|
|
||||||
}
|
|
||||||
output_parent = output.resolve().parent
|
output_parent = output.resolve().parent
|
||||||
output_parent.mkdir(parents=True, exist_ok=True)
|
output_parent.mkdir(parents=True, exist_ok=True)
|
||||||
temporary = Path(tempfile.mkdtemp(prefix=f".{output.name}-", dir=output_parent))
|
temporary = Path(tempfile.mkdtemp(prefix=f".{output.name}-", dir=output_parent))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue