forked from openshift-eng/aos-cd-jobs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti_action.py
More file actions
35 lines (26 loc) · 1006 Bytes
/
multi_action.py
File metadata and controls
35 lines (26 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from __future__ import print_function, unicode_literals, absolute_import
from .interface import Action
class MultiAction(Action):
"""
A MultiAction action wraps many actions.
"""
def __init__(self, output_format, children):
self.children = children
self.output_format = output_format
def generate_parameters(self):
parameters = []
for child in self.children:
parameters.extend(child.generate_parameters())
return parameters
def generate_build_steps(self):
build_steps = []
for child in self.children:
child.output_format = self.output_format
build_steps.extend(child.generate_build_steps())
return build_steps
def generate_post_build_steps(self):
post_build_steps = []
for child in self.children:
child.output_format = self.output_format
post_build_steps.extend(child.generate_post_build_steps())
return post_build_steps