pipeline: ensure the build tree is always built
If there is a build pipeline specified, always build it, even if there are no accompanying stages. If we short-circuit earlier and ignore the build pipeline section, errors in the build pipeline would not be caught at all.
This commit is contained in:
parent
58e0cc15df
commit
2d959e4d43
1 changed files with 7 additions and 5 deletions
|
|
@ -217,11 +217,6 @@ class Pipeline:
|
||||||
def build_stages(self, object_store, interactive, libdir, secrets):
|
def build_stages(self, object_store, interactive, libdir, secrets):
|
||||||
results = {"success": True}
|
results = {"success": True}
|
||||||
|
|
||||||
if not self.stages:
|
|
||||||
build_tree = objectstore.HostTree(object_store)
|
|
||||||
tree = object_store.new()
|
|
||||||
return results, build_tree, tree
|
|
||||||
|
|
||||||
# We need a build tree for the stages below, which is either
|
# We need a build tree for the stages below, which is either
|
||||||
# another tree that needs to be built with the build pipeline
|
# another tree that needs to be built with the build pipeline
|
||||||
# or the host file system if no build pipeline is specified
|
# or the host file system if no build pipeline is specified
|
||||||
|
|
@ -249,6 +244,13 @@ class Pipeline:
|
||||||
|
|
||||||
build_tree = tree
|
build_tree = tree
|
||||||
|
|
||||||
|
# If there are no stages, just return build tree we just
|
||||||
|
# obtained and a new, clean `tree`
|
||||||
|
if not self.stages:
|
||||||
|
tree = object_store.new()
|
||||||
|
return results, build_tree, tree
|
||||||
|
|
||||||
|
|
||||||
# Create a new tree. The base is our tree_id because if that
|
# Create a new tree. The base is our tree_id because if that
|
||||||
# is already in the store, we can short-circuit directly and
|
# is already in the store, we can short-circuit directly and
|
||||||
# exit directly; `tree` is then used to read the tree behind
|
# exit directly; `tree` is then used to read the tree behind
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue