diff options
-rw-r--r-- | ick2/buildsm.py | 6 | ||||
-rw-r--r-- | yarns/400-build.yarn | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ick2/buildsm.py b/ick2/buildsm.py index 2e6d079..9177e09 100644 --- a/ick2/buildsm.py +++ b/ick2/buildsm.py @@ -122,6 +122,7 @@ class BuildStateMachine: return BUILD_NOTIFYING, (action_id, action) def mark_action_done(self, event): + self.build.resource['exit_code'] = event.exit_code graph = self.build.get_graph() graph.set_action_status(event.action_id, ick2.ACTION_DONE) graph.unblock() @@ -139,13 +140,15 @@ class BuildStateMachine: graph.append_action(action, ick2.ACTION_READY, depends=[]) def mark_notification_done(self, event): + if event.exit_code not in (0, None): # pragma: no cover + self.build.resource['exit_code'] = event.exit_code graph = self.build.get_graph() graph.set_action_status(event.action_id, ick2.ACTION_DONE) graph.unblock() if graph.has_more_to_do(): # pragma: no cover return BUILD_NOTIFYING, None - if self.build.resource.get('exit_code') is None: + if self.build.resource.get('exit_code') in (0, None): self.build.resource['exit_code'] = 0 return BUILD_DONE, None @@ -206,6 +209,7 @@ class ActionFinishedEvent(BuildEvent): def __init__(self, action_id): self.action_id = action_id + self.exit_code = 0 class ActionFailedEvent(BuildEvent): diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn index cef92e9..0d75ec0 100644 --- a/yarns/400-build.yarn +++ b/yarns/400-build.yarn @@ -343,7 +343,7 @@ The build status now shows the next step as the active one. ... } ... }, ... "status": "building", - ... "exit_code": null, + ... "exit_code": 0, ... "log": "/logs/rome/1" ... } ... ] |