formats/v1: propagate build pipeline status
When formatting the the result, switch the default to success, but then properly propagate the status of the build pipeline. This should ensure that if there are no pipeline results but a failed build pipeline, the overall status will be 'failed'. On the other hand, if no pipelines were built, including tree or build, the overall status will be 'success'.
This commit is contained in:
parent
8770bdf10a
commit
a2404c9ec9
1 changed files with 4 additions and 1 deletions
|
|
@ -201,11 +201,14 @@ def output(manifest: Manifest, res: Dict) -> Dict:
|
|||
# result but still need to to recurse
|
||||
current = res.get(pipeline.id, {})
|
||||
retval = {
|
||||
"success": current.get("success", False)
|
||||
"success": current.get("success", True)
|
||||
}
|
||||
|
||||
if pipeline.build:
|
||||
build = manifest[pipeline.build]
|
||||
retval["build"] = result_for_pipeline(build)
|
||||
retval["success"] = retval["build"]["success"]
|
||||
|
||||
stages = current.get("stages")
|
||||
if stages:
|
||||
retval["stages"] = stages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue