summaryrefslogtreecommitdiff
path: root/ick2/controllerapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'ick2/controllerapi.py')
-rw-r--r--ick2/controllerapi.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py
index 8b4bc29..a9a97e9 100644
--- a/ick2/controllerapi.py
+++ b/ick2/controllerapi.py
@@ -435,8 +435,8 @@ class WorkAPI(APIbase):
pipeline=pipeline,
doing=doing)
- if update.get('exit_code') == 0:
- ick2.log.log('trace', msg_texg='xxx finishing step')
+ exit_code = update.get('exit_code')
+ if exit_code == 0:
index = doing['step_index'] + 1
actions = pipeline['actions']
if index >= len(actions):
@@ -453,6 +453,18 @@ class WorkAPI(APIbase):
'doing': doing,
}
self._update_worker(worker_state)
+ elif exit_code is not None:
+ assert isinstance(exit_code, int)
+ assert exit_code != 0
+ pipeline['status'] = 'idle'
+ self._finish_build(update)
+ self._update_project(project)
+
+ worker_state = {
+ 'worker': update['worker'],
+ 'doing': {},
+ }
+ self._update_worker(worker_state)
def _check_work_update(self, doing, update): # pragma: no cover
must_match = ['worker', 'project', 'pipeline', 'build_id']