formats/v1: determine build_id outside param

Instead of determining the build id while constructing the
Pipeline object, do so beforehand. This makes it clearer
what is going.
This commit is contained in:
Christian Kellner 2021-01-15 15:37:47 +01:00 committed by Tom Gundersen
parent da16fe30bf
commit a0e862f083

View file

@ -60,8 +60,8 @@ def load_pipeline(description: Dict, result: List[Pipeline]) -> Pipeline:
else:
build_pipeline, runner = None, detect_host_runner()
pipeline = Pipeline(runner, build_pipeline and build_pipeline.tree_id)
build_id = build_pipeline and build_pipeline.tree_id
pipeline = Pipeline(runner, build_id)
for s in description.get("stages", []):
pipeline.add_stage(s["name"], s.get("options", {}))