diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-04-18 20:42:26 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-04-18 20:42:26 +0300 |
commit | 04e899ded340bc0fd3afd6b0a62dff22c182e735 (patch) | |
tree | 29fd65adc9540d826e56d5f2c9c2a8d06e457520 /ick2 | |
parent | 67cee88e24e95cd166bc27410e9ceb1d18bff135 (diff) | |
download | ick2-04e899ded340bc0fd3afd6b0a62dff22c182e735.tar.gz |
Change: add all actions from all pipelines when project build starts
Diffstat (limited to 'ick2')
-rw-r--r-- | ick2/workapi.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ick2/workapi.py b/ick2/workapi.py index a23f603..f1352d0 100644 --- a/ick2/workapi.py +++ b/ick2/workapi.py @@ -117,7 +117,7 @@ class WorkAPI(ick2.APIbase): create_workspace = { 'action': 'create_workspace', } - actions = [create_workspace] + list(pipeline['actions']) + actions = [create_workspace] + self._get_actions(project) build = { 'build_id': build_id, 'build_number': build_no, @@ -133,6 +133,13 @@ class WorkAPI(ick2.APIbase): self._builds.add(build_id, build) return build_id, build_no + def _get_actions(self, project): + actions = [] + for pipeline_name in project['pipelines']: + pipeline = self._state.get_resource('pipelines', pipeline_name) + actions.extend(list(pipeline['actions'])) + return actions + def _get_build(self, build_id): return self._builds.get(build_id) |