zrb 0.0.109__py3-none-any.whl → 0.0.110__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zrb/action/runner.py +2 -2
- zrb/builtin/git.py +1 -3
- zrb/helper/accessories/name.py +21 -11
- zrb/helper/env_map/fetch.py +13 -13
- zrb/shell-scripts/rsync-util.sh +3 -3
- zrb/task/any_task.py +44 -18
- zrb/task/base_remote_cmd_task.py +43 -18
- zrb/task/base_task.py +34 -49
- zrb/task/base_task_composite.py +92 -30
- zrb/task/cmd_task.py +22 -19
- zrb/task/docker_compose_task.py +18 -32
- zrb/task/flow_task.py +4 -4
- {zrb-0.0.109.dist-info → zrb-0.0.110.dist-info}/METADATA +1 -1
- {zrb-0.0.109.dist-info → zrb-0.0.110.dist-info}/RECORD +17 -17
- {zrb-0.0.109.dist-info → zrb-0.0.110.dist-info}/LICENSE +0 -0
- {zrb-0.0.109.dist-info → zrb-0.0.110.dist-info}/WHEEL +0 -0
- {zrb-0.0.109.dist-info → zrb-0.0.110.dist-info}/entry_points.txt +0 -0
zrb/action/runner.py
CHANGED
@@ -28,7 +28,7 @@ class Runner():
|
|
28
28
|
|
29
29
|
def register(self, task: AnyTask):
|
30
30
|
task.set_has_cli_interface()
|
31
|
-
cmd_name = task.
|
31
|
+
cmd_name = task.get_full_cmd_name()
|
32
32
|
logger.debug(colored(f'Register task: {cmd_name}', attrs=['dark']))
|
33
33
|
self._tasks.append(task)
|
34
34
|
logger.debug(colored(f'Task registered: {cmd_name}', attrs=['dark']))
|
@@ -77,7 +77,7 @@ class Runner():
|
|
77
77
|
return group
|
78
78
|
|
79
79
|
def _create_cli_command(self, task: AnyTask) -> click.Command:
|
80
|
-
task_inputs = task.
|
80
|
+
task_inputs = task._get_combined_inputs()
|
81
81
|
task_cmd_name = task.get_cmd_name()
|
82
82
|
task_description = task.get_description()
|
83
83
|
task_function = task.to_function(
|
zrb/builtin/git.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
from zrb.helper.typing import Any
|
2
2
|
from zrb.builtin.group import git_group
|
3
3
|
from zrb.task.decorator import python_task
|
4
|
-
from zrb.task.task import Task
|
5
4
|
from zrb.task_input.str_input import StrInput
|
6
5
|
from zrb.task_input.bool_input import BoolInput
|
7
6
|
from zrb.runner import runner
|
@@ -26,7 +25,7 @@ from zrb.helper.python_task import show_lines
|
|
26
25
|
prompt='Commit hash/Tag',
|
27
26
|
default='HEAD'
|
28
27
|
),
|
29
|
-
|
28
|
+
BoolInput(
|
30
29
|
name='include-new',
|
31
30
|
description='include new files',
|
32
31
|
prompt='Include new files',
|
@@ -52,7 +51,6 @@ async def get_file_changes(*args: Any, **kwargs: Any):
|
|
52
51
|
include_new = kwargs.get('include_new', True)
|
53
52
|
include_removed = kwargs.get('include_removed', True)
|
54
53
|
include_updated = kwargs.get('include_updated', True)
|
55
|
-
task: Task = kwargs['_task']
|
56
54
|
modified_file_states = get_modified_file_states(commit)
|
57
55
|
modified_file_keys = []
|
58
56
|
output = []
|
zrb/helper/accessories/name.py
CHANGED
@@ -10,19 +10,29 @@ def get_random_name(
|
|
10
10
|
digit_count: int = 4
|
11
11
|
) -> str:
|
12
12
|
prefixes = [
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
'albedo', 'argent', 'argentum', 'aurora', 'aurum', 'azure',
|
14
|
+
'basilisk', 'cerulean', 'chimeric', 'citrin', 'coral', 'crimson',
|
15
|
+
'diamond', 'draco', 'dragon', 'emerald', 'ethereal', 'ferrum',
|
16
|
+
'flammeus', 'garnet', 'glacial', 'glimmering', 'glistening', 'golden',
|
17
|
+
'helios', 'igneous', 'imperial', 'jade', 'luminous', 'luna', 'lunar',
|
18
|
+
'mystic', 'nephrite', 'nocturnal', 'obsidian', 'opal', 'pearl',
|
19
|
+
'platinum', 'prismatic', 'ruby', 'sapphire', 'serpentine', 'silver',
|
20
|
+
'sol', 'solar', 'spiritual', 'stellar', 'tempest', 'topaz',
|
21
|
+
'turquoise', 'verde', 'vermillion', 'vitreous', 'zephyr', 'zircon'
|
18
22
|
]
|
19
23
|
suffixes = [
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
'aether', 'albedo', 'alchemy', 'arcana', 'aureum', 'aetheris',
|
25
|
+
'anima', 'astralis', 'caelestis', 'chrysopoeia', 'cosmicum',
|
26
|
+
'crystallum', 'deum', 'divinitas', 'draconis', 'elementorum', 'elixir',
|
27
|
+
'essentia', 'eternis', 'ethereus', 'fatum', 'flamma', 'fulgur',
|
28
|
+
'hermetica', 'ignis', 'illuminationis', 'imperium', 'incantatum',
|
29
|
+
'infinitum', 'lapis', 'lux', 'magicae', 'magnum', 'materia',
|
30
|
+
'metallum', 'mysticum', 'natura', 'occultum', 'omnipotentis',
|
31
|
+
'opulentia', 'philosophia', 'philosophorum', 'praeparatum',
|
32
|
+
'praestantissimum', 'prima', 'primordium', 'quintessentia',
|
33
|
+
'regeneratio', 'ritualis', 'sanctum', 'spiritus', 'tenebris',
|
34
|
+
'terra', 'tinctura', 'transmutationis', 'universalis', 'vapores',
|
35
|
+
'venenum', 'veritas', 'vitae', 'volatus'
|
26
36
|
]
|
27
37
|
prefix = random.choice(prefixes)
|
28
38
|
suffix = random.choice(suffixes)
|
zrb/helper/env_map/fetch.py
CHANGED
@@ -16,7 +16,7 @@ def fetch_env_map_from_group(
|
|
16
16
|
sub_env_map: Mapping[str, str] = fetch_env_map_from_group(
|
17
17
|
env_map, sub_group
|
18
18
|
)
|
19
|
-
env_map =
|
19
|
+
env_map = _cascade_env_map(env_map, sub_env_map)
|
20
20
|
return env_map
|
21
21
|
|
22
22
|
|
@@ -25,33 +25,33 @@ def fetch_env_map_from_task(
|
|
25
25
|
env_map: Mapping[str, str], task: AnyTask
|
26
26
|
):
|
27
27
|
task_env_map: Mapping[str, str] = {}
|
28
|
-
for env_file in task.
|
28
|
+
for env_file in task._get_env_files():
|
29
29
|
envs = env_file.get_envs()
|
30
|
-
task_env_map =
|
31
|
-
task_env_map =
|
32
|
-
env_map =
|
33
|
-
for upstream in task.
|
30
|
+
task_env_map = _add_envs_to_env_map(task_env_map, envs)
|
31
|
+
task_env_map = _add_envs_to_env_map(task_env_map, task._envs)
|
32
|
+
env_map = _cascade_env_map(env_map, task_env_map)
|
33
|
+
for upstream in task._get_upstreams():
|
34
34
|
task_env_map = fetch_env_map_from_task(env_map, upstream)
|
35
|
-
for checker in task.
|
35
|
+
for checker in task._get_checkers():
|
36
36
|
task_env_map = fetch_env_map_from_task(env_map, checker)
|
37
37
|
return env_map
|
38
38
|
|
39
39
|
|
40
40
|
@typechecked
|
41
|
-
def
|
41
|
+
def _add_envs_to_env_map(
|
42
42
|
env_map: Mapping[str, str], envs: List[Env]
|
43
43
|
) -> Mapping[str, str]:
|
44
44
|
for env in envs:
|
45
45
|
if env.os_name == '':
|
46
46
|
continue
|
47
|
-
env_name =
|
48
|
-
env_default =
|
47
|
+
env_name = _get_env_name(env)
|
48
|
+
env_default = _get_env_default(env)
|
49
49
|
env_map[env_name] = env_default
|
50
50
|
return env_map
|
51
51
|
|
52
52
|
|
53
53
|
@typechecked
|
54
|
-
def
|
54
|
+
def _cascade_env_map(
|
55
55
|
env_map: Mapping[str, str],
|
56
56
|
other_env_map: Mapping[str, str]
|
57
57
|
) -> Mapping[str, str]:
|
@@ -63,14 +63,14 @@ def cascade_env_map(
|
|
63
63
|
|
64
64
|
|
65
65
|
@typechecked
|
66
|
-
def
|
66
|
+
def _get_env_name(env: Env) -> str:
|
67
67
|
if env.os_name is None:
|
68
68
|
return env.name
|
69
69
|
return env.os_name
|
70
70
|
|
71
71
|
|
72
72
|
@typechecked
|
73
|
-
def
|
73
|
+
def _get_env_default(env: Env) -> str:
|
74
74
|
if is_probably_jinja(env.default):
|
75
75
|
return ''
|
76
76
|
return env.default
|
zrb/shell-scripts/rsync-util.sh
CHANGED
@@ -2,11 +2,11 @@ set -e
|
|
2
2
|
auth_rsync(){
|
3
3
|
if [ "$_CONFIG_SSH_KEY" != "" ]
|
4
4
|
then
|
5
|
-
rsync -avz -e "ssh -i $_CONFIG_SSH_KEY -p $_CONFIG_PORT" $@
|
5
|
+
rsync --mkpath -avz -e "ssh -i $_CONFIG_SSH_KEY -p $_CONFIG_PORT" $@
|
6
6
|
elif [ "$_CONFIG_PASSWORD" != "" ]
|
7
7
|
then
|
8
|
-
sshpass -p "$_CONFIG_PASSWORD" rsync -avz -e "ssh -p $_CONFIG_PORT" $@
|
8
|
+
sshpass -p "$_CONFIG_PASSWORD" rsync --mkpath -avz -e "ssh -p $_CONFIG_PORT" $@
|
9
9
|
else
|
10
|
-
rsync -avz -e "ssh -p $_CONFIG_PORT" $@
|
10
|
+
rsync --mkpath -avz -e "ssh -p $_CONFIG_PORT" $@
|
11
11
|
fi
|
12
12
|
}
|
zrb/task/any_task.py
CHANGED
@@ -65,23 +65,35 @@ class AnyTask(ABC):
|
|
65
65
|
pass
|
66
66
|
|
67
67
|
@abstractmethod
|
68
|
-
def
|
68
|
+
def add_upstream(self, *upstreams: TAnyTask):
|
69
69
|
pass
|
70
70
|
|
71
71
|
@abstractmethod
|
72
|
-
def
|
72
|
+
def insert_input(self, *inputs: AnyInput):
|
73
73
|
pass
|
74
74
|
|
75
75
|
@abstractmethod
|
76
|
-
def
|
76
|
+
def add_input(self, *inputs: AnyInput):
|
77
77
|
pass
|
78
78
|
|
79
79
|
@abstractmethod
|
80
|
-
def
|
80
|
+
def insert_env(self, *envs: Env):
|
81
81
|
pass
|
82
82
|
|
83
83
|
@abstractmethod
|
84
|
-
def
|
84
|
+
def add_env(self, *envs: Env):
|
85
|
+
pass
|
86
|
+
|
87
|
+
@abstractmethod
|
88
|
+
def insert_env_file(self, *env_files: EnvFile):
|
89
|
+
pass
|
90
|
+
|
91
|
+
@abstractmethod
|
92
|
+
def add_env_file(self, *env_files: EnvFile):
|
93
|
+
pass
|
94
|
+
|
95
|
+
@abstractmethod
|
96
|
+
def _set_execution_id(self, execution_id: str):
|
85
97
|
pass
|
86
98
|
|
87
99
|
@abstractmethod
|
@@ -139,31 +151,51 @@ class AnyTask(ABC):
|
|
139
151
|
pass
|
140
152
|
|
141
153
|
@abstractmethod
|
142
|
-
def
|
154
|
+
def get_full_cmd_name(self) -> str:
|
155
|
+
pass
|
156
|
+
|
157
|
+
@abstractmethod
|
158
|
+
def inject_env_files(self):
|
159
|
+
pass
|
160
|
+
|
161
|
+
@abstractmethod
|
162
|
+
def _get_env_files(self) -> List[EnvFile]:
|
163
|
+
pass
|
164
|
+
|
165
|
+
@abstractmethod
|
166
|
+
def inject_envs(self):
|
167
|
+
pass
|
168
|
+
|
169
|
+
@abstractmethod
|
170
|
+
def _get_envs(self) -> List[Env]:
|
143
171
|
pass
|
144
172
|
|
145
173
|
@abstractmethod
|
146
|
-
def
|
174
|
+
def inject_inputs(self):
|
147
175
|
pass
|
148
176
|
|
149
177
|
@abstractmethod
|
150
|
-
def
|
178
|
+
def _get_inputs(self) -> List[AnyInput]:
|
151
179
|
pass
|
152
180
|
|
153
181
|
@abstractmethod
|
154
|
-
def
|
182
|
+
def inject_checkers(self):
|
155
183
|
pass
|
156
184
|
|
157
185
|
@abstractmethod
|
158
|
-
def
|
186
|
+
def _get_checkers(self) -> Iterable[TAnyTask]:
|
159
187
|
pass
|
160
188
|
|
161
189
|
@abstractmethod
|
162
|
-
def
|
190
|
+
def inject_upstreams(self):
|
163
191
|
pass
|
164
192
|
|
165
193
|
@abstractmethod
|
166
|
-
def
|
194
|
+
def _get_upstreams(self) -> Iterable[TAnyTask]:
|
195
|
+
pass
|
196
|
+
|
197
|
+
@abstractmethod
|
198
|
+
def _get_combined_inputs(self) -> Iterable[AnyInput]:
|
167
199
|
pass
|
168
200
|
|
169
201
|
@abstractmethod
|
@@ -206,12 +238,6 @@ class AnyTask(ABC):
|
|
206
238
|
def get_env_map(self) -> Mapping[str, Any]:
|
207
239
|
pass
|
208
240
|
|
209
|
-
@abstractmethod
|
210
|
-
def inject_env_map(
|
211
|
-
self, env_map: Mapping[str, str], override: bool = False
|
212
|
-
):
|
213
|
-
pass
|
214
|
-
|
215
241
|
@abstractmethod
|
216
242
|
def render_any(
|
217
243
|
self, val: Any, data: Optional[Mapping[str, Any]] = None
|
zrb/task/base_remote_cmd_task.py
CHANGED
@@ -2,6 +2,7 @@ from zrb.helper.typing import (
|
|
2
2
|
Any, Callable, Iterable, Mapping, Optional, Union, TypeVar
|
3
3
|
)
|
4
4
|
from zrb.helper.typecheck import typechecked
|
5
|
+
from zrb.helper.util import to_snake_case
|
5
6
|
from zrb.task.any_task import AnyTask
|
6
7
|
from zrb.task.any_task_event_handler import (
|
7
8
|
OnTriggered, OnWaiting, OnSkipped, OnStarted, OnReady, OnRetry, OnFailed
|
@@ -34,13 +35,15 @@ class RemoteConfig:
|
|
34
35
|
user: str = '',
|
35
36
|
password: str = '',
|
36
37
|
ssh_key: str = '',
|
37
|
-
port: int = 22
|
38
|
+
port: int = 22,
|
39
|
+
config_map: Optional[Mapping[str, str]] = None
|
38
40
|
):
|
39
41
|
self.host = host
|
40
42
|
self.user = user
|
41
43
|
self.password = password
|
42
44
|
self.ssh_key = ssh_key
|
43
45
|
self.port = port
|
46
|
+
self.config_map = {} if config_map is None else config_map
|
44
47
|
|
45
48
|
|
46
49
|
@typechecked
|
@@ -123,28 +126,50 @@ class SingleBaseRemoteCmdTask(CmdTask):
|
|
123
126
|
def copy(self) -> TSingleBaseRemoteCmdTask:
|
124
127
|
return copy.deepcopy(self)
|
125
128
|
|
126
|
-
def
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
129
|
+
def inject_envs(self):
|
130
|
+
super().inject_envs()
|
131
|
+
# add remote config properties as env
|
132
|
+
self.add_env(
|
133
|
+
Env(
|
134
|
+
name='_CONFIG_HOST', os_name='',
|
135
|
+
default=self.render_str(self._remote_config.host)
|
136
|
+
),
|
137
|
+
Env(
|
138
|
+
name='_CONFIG_PORT', os_name='',
|
139
|
+
default=str(self.render_int(self._remote_config.port))
|
140
|
+
),
|
141
|
+
Env(
|
142
|
+
name='_CONFIG_SSH_KEY', os_name='',
|
143
|
+
default=self.render_str(self._remote_config.ssh_key)
|
144
|
+
),
|
145
|
+
Env(
|
146
|
+
name='_CONFIG_USER', os_name='',
|
147
|
+
default=self.render_str(self._remote_config.user)
|
148
|
+
),
|
149
|
+
Env(
|
150
|
+
name='_CONFIG_PASSWORD', os_name='',
|
151
|
+
default=self.render_str(self._remote_config.password)
|
152
|
+
),
|
138
153
|
)
|
139
|
-
|
154
|
+
for key, val in self._remote_config.config_map.items():
|
155
|
+
upper_snake_key = to_snake_case(key).upper()
|
156
|
+
rendered_val = self.render_str(val)
|
157
|
+
# add remote config map as env
|
158
|
+
self.add_env(
|
159
|
+
Env(
|
160
|
+
name='_CONFIG_MAP_' + upper_snake_key,
|
161
|
+
os_name='',
|
162
|
+
default=rendered_val
|
163
|
+
)
|
164
|
+
)
|
140
165
|
|
141
|
-
def
|
166
|
+
def get_cmd_script(self, *args: Any, **kwargs: Any) -> str:
|
142
167
|
cmd_str = '\n'.join([
|
143
|
-
self.
|
168
|
+
self._create_cmd_script(
|
144
169
|
self._pre_cmd_path, self._pre_cmd, *args, **kwargs
|
145
170
|
),
|
146
|
-
super().
|
147
|
-
self.
|
171
|
+
super().get_cmd_script(*args, **kwargs),
|
172
|
+
self._create_cmd_script(
|
148
173
|
self._post_cmd_path, self._post_cmd, *args, **kwargs
|
149
174
|
),
|
150
175
|
])
|
zrb/task/base_task.py
CHANGED
@@ -110,30 +110,28 @@ class BaseTask(
|
|
110
110
|
self._is_execution_started: bool = False
|
111
111
|
self._args: List[Any] = []
|
112
112
|
self._kwargs: Mapping[str, Any] = {}
|
113
|
-
self._allow_add_upstreams: bool = True
|
114
113
|
|
115
114
|
def copy(self) -> AnyTask:
|
116
115
|
return copy.deepcopy(self)
|
117
116
|
|
118
|
-
def
|
117
|
+
def _get_combined_inputs(self) -> Iterable[AnyInput]:
|
119
118
|
''''
|
120
119
|
Getting all inputs of this task and all its upstream, non-duplicated.
|
121
120
|
'''
|
122
121
|
if self._all_inputs is not None:
|
123
122
|
return self._all_inputs
|
124
|
-
self._allow_add_upstreams = False
|
125
|
-
self._allow_add_inputs = False
|
126
123
|
self._all_inputs: List[AnyInput] = []
|
127
124
|
existing_input_names: Mapping[str, bool] = {}
|
128
125
|
# Add task inputs
|
129
|
-
|
126
|
+
inputs = self._get_inputs()
|
127
|
+
for input_index, first_occurence_task_input in enumerate(inputs):
|
130
128
|
input_name = first_occurence_task_input.get_name()
|
131
129
|
if input_name in existing_input_names:
|
132
130
|
continue
|
133
131
|
# Look for all input with the same name in the current task
|
134
132
|
task_inputs = [
|
135
133
|
candidate
|
136
|
-
for candidate in
|
134
|
+
for candidate in inputs[input_index:]
|
137
135
|
if candidate.get_name() == input_name
|
138
136
|
]
|
139
137
|
# Get the last input, and add it to _all_inputs
|
@@ -141,13 +139,15 @@ class BaseTask(
|
|
141
139
|
self._all_inputs.append(task_input)
|
142
140
|
existing_input_names[input_name] = True
|
143
141
|
# Add upstream inputs
|
144
|
-
for upstream in self.
|
145
|
-
upstream_inputs = upstream.
|
142
|
+
for upstream in self._get_upstreams():
|
143
|
+
upstream_inputs = upstream._get_combined_inputs()
|
146
144
|
for upstream_input in upstream_inputs:
|
147
145
|
if upstream_input.get_name() in existing_input_names:
|
148
146
|
continue
|
149
147
|
self._all_inputs.append(upstream_input)
|
150
148
|
existing_input_names[upstream_input.get_name()] = True
|
149
|
+
self._allow_add_upstreams = False
|
150
|
+
self._allow_add_inputs = False
|
151
151
|
return self._all_inputs
|
152
152
|
|
153
153
|
def to_function(
|
@@ -167,21 +167,6 @@ class BaseTask(
|
|
167
167
|
))
|
168
168
|
return function
|
169
169
|
|
170
|
-
def add_upstreams(self, *upstreams: AnyTask):
|
171
|
-
if not self._allow_add_upstreams:
|
172
|
-
raise Exception(f'Cannot add upstreams on `{self._name}`')
|
173
|
-
self._upstreams += upstreams
|
174
|
-
|
175
|
-
def inject_env_map(
|
176
|
-
self, env_map: Mapping[str, str], override: bool = False
|
177
|
-
):
|
178
|
-
'''
|
179
|
-
Set new values for current task's env map
|
180
|
-
'''
|
181
|
-
for key, val in env_map.items():
|
182
|
-
if override or key not in self.get_env_map():
|
183
|
-
self._set_env_map(key, val)
|
184
|
-
|
185
170
|
async def run(self, *args: Any, **kwargs: Any) -> Any:
|
186
171
|
'''
|
187
172
|
Do task execution
|
@@ -259,28 +244,28 @@ class BaseTask(
|
|
259
244
|
return True
|
260
245
|
self._is_keyval_set = True
|
261
246
|
self.log_info('Set input map')
|
262
|
-
for task_input in self.
|
247
|
+
for task_input in self._get_combined_inputs():
|
263
248
|
input_name = self._get_normalized_input_key(task_input.get_name())
|
264
249
|
input_value = self.render_any(
|
265
250
|
kwargs.get(input_name, task_input.get_default())
|
266
251
|
)
|
267
252
|
self._set_input_map(input_name, input_value)
|
253
|
+
self._set_input_map('_execution_id', self._execution_id)
|
268
254
|
self.log_debug(
|
269
255
|
'Input map:\n' + map_to_str(self.get_input_map(), item_prefix=' ')
|
270
256
|
)
|
271
257
|
self.log_info('Merging task envs, task env files, and native envs')
|
272
|
-
for env_name, env in self.
|
258
|
+
for env_name, env in self._get_combined_env().items():
|
273
259
|
env_value = env.get(env_prefix)
|
274
260
|
if env.renderable:
|
275
261
|
env_value = self.render_any(env_value)
|
276
262
|
self._set_env_map(env_name, env_value)
|
263
|
+
self._set_env_map('_ZRB_EXECUTION_ID', self._execution_id)
|
277
264
|
self.log_debug(
|
278
265
|
'Env map:\n' + map_to_str(self.get_env_map(), item_prefix=' ')
|
279
266
|
)
|
280
267
|
|
281
|
-
def
|
282
|
-
self._allow_add_envs = False
|
283
|
-
self._allow_add_env_files = False
|
268
|
+
def _get_combined_env(self) -> Mapping[str, Env]:
|
284
269
|
all_envs: Mapping[str, Env] = {}
|
285
270
|
for env_name in os.environ:
|
286
271
|
if env_name in RESERVED_ENV_NAMES:
|
@@ -288,11 +273,13 @@ class BaseTask(
|
|
288
273
|
all_envs[env_name] = Env(
|
289
274
|
name=env_name, os_name=env_name, renderable=False
|
290
275
|
)
|
291
|
-
for env_file in self.
|
276
|
+
for env_file in self._get_env_files():
|
292
277
|
for env in env_file.get_envs():
|
293
278
|
all_envs[env.name] = env
|
294
|
-
for env in self.
|
279
|
+
for env in self._get_envs():
|
295
280
|
all_envs[env.name] = env
|
281
|
+
self._allow_add_envs = False
|
282
|
+
self._allow_add_env_files = False
|
296
283
|
return all_envs
|
297
284
|
|
298
285
|
def _get_normalized_input_key(self, key: str) -> str:
|
@@ -310,7 +297,9 @@ class BaseTask(
|
|
310
297
|
try:
|
311
298
|
self._start_timer()
|
312
299
|
if self.get_execution_id() == '':
|
313
|
-
self.
|
300
|
+
self._set_execution_id(
|
301
|
+
get_random_name(add_random_digit=True, digit_count=5)
|
302
|
+
)
|
314
303
|
self.log_info('Set input and env map')
|
315
304
|
await self._set_keyval(kwargs=kwargs, env_prefix=env_prefix)
|
316
305
|
self.log_info('Set run kwargs')
|
@@ -348,9 +337,10 @@ class BaseTask(
|
|
348
337
|
return
|
349
338
|
if self._return_upstream_result:
|
350
339
|
# if _return_upstream_result, result is list (see: self._run_all)
|
340
|
+
upstreams = self._get_upstreams()
|
351
341
|
upstream_results = list(result)
|
352
342
|
for upstream_index, upstream_result in enumerate(upstream_results):
|
353
|
-
|
343
|
+
upstreams[upstream_index]._print_result(upstream_result)
|
354
344
|
return
|
355
345
|
self.print_result(result)
|
356
346
|
|
@@ -363,11 +353,6 @@ class BaseTask(
|
|
363
353
|
if you want to show the result differently.
|
364
354
|
'''
|
365
355
|
print(result)
|
366
|
-
|
367
|
-
def set_execution_id(self, execution_id: str):
|
368
|
-
super().set_execution_id(execution_id)
|
369
|
-
self._set_env_map('_ZRB_EXECUTION_ID', execution_id)
|
370
|
-
self._set_input_map('_execution_id', execution_id)
|
371
356
|
|
372
357
|
async def _loop_check(self, show_done: bool = False) -> bool:
|
373
358
|
self.log_info('Start readiness checking')
|
@@ -393,14 +378,14 @@ class BaseTask(
|
|
393
378
|
|
394
379
|
def _show_run_command(self):
|
395
380
|
params: List[str] = [double_quote(arg) for arg in self._args]
|
396
|
-
for task_input in self.
|
381
|
+
for task_input in self._get_combined_inputs():
|
397
382
|
if task_input.is_hidden():
|
398
383
|
continue
|
399
384
|
key = task_input.get_name()
|
400
385
|
kwarg_key = self._get_normalized_input_key(key)
|
401
386
|
quoted_value = double_quote(str(self._kwargs[kwarg_key]))
|
402
387
|
params.append(f'--{key} {quoted_value}')
|
403
|
-
run_cmd = self.
|
388
|
+
run_cmd = self.get_full_cmd_name()
|
404
389
|
run_cmd_with_param = run_cmd
|
405
390
|
if len(params) > 0:
|
406
391
|
param_str = ' '.join(params)
|
@@ -437,7 +422,7 @@ class BaseTask(
|
|
437
422
|
await asyncio.sleep(0.1)
|
438
423
|
check_coroutines: Iterable[asyncio.Task] = []
|
439
424
|
for checker_task in self._checkers:
|
440
|
-
checker_task.
|
425
|
+
checker_task._set_execution_id(self.get_execution_id())
|
441
426
|
check_coroutines.append(
|
442
427
|
asyncio.create_task(checker_task._run_all())
|
443
428
|
)
|
@@ -449,8 +434,8 @@ class BaseTask(
|
|
449
434
|
coroutines: Iterable[asyncio.Task] = []
|
450
435
|
# Add upstream tasks to processes
|
451
436
|
self._allow_add_upstreams = False
|
452
|
-
for upstream_task in self.
|
453
|
-
upstream_task.
|
437
|
+
for upstream_task in self._get_upstreams():
|
438
|
+
upstream_task._set_execution_id(self.get_execution_id())
|
454
439
|
coroutines.append(asyncio.create_task(
|
455
440
|
upstream_task._run_all(**kwargs)
|
456
441
|
))
|
@@ -472,7 +457,7 @@ class BaseTask(
|
|
472
457
|
# get upstream checker
|
473
458
|
upstream_check_processes: Iterable[asyncio.Task] = []
|
474
459
|
self._allow_add_upstreams = False
|
475
|
-
for upstream_task in self.
|
460
|
+
for upstream_task in self._get_upstreams():
|
476
461
|
upstream_check_processes.append(asyncio.create_task(
|
477
462
|
upstream_task._loop_check()
|
478
463
|
))
|
@@ -516,7 +501,7 @@ class BaseTask(
|
|
516
501
|
|
517
502
|
async def _set_keyval(self, kwargs: Mapping[str, Any], env_prefix: str):
|
518
503
|
# if input is not in input_map, add default values
|
519
|
-
for task_input in self.
|
504
|
+
for task_input in self._get_combined_inputs():
|
520
505
|
key = self._get_normalized_input_key(task_input.get_name())
|
521
506
|
if key in kwargs:
|
522
507
|
continue
|
@@ -527,20 +512,20 @@ class BaseTask(
|
|
527
512
|
new_kwargs = copy.deepcopy(kwargs)
|
528
513
|
new_kwargs.update(self.get_input_map())
|
529
514
|
upstream_coroutines = []
|
530
|
-
# set
|
515
|
+
# set upstreams keyval
|
531
516
|
self._allow_add_upstreams = False
|
532
|
-
for upstream_task in self.
|
517
|
+
for upstream_task in self._get_upstreams():
|
533
518
|
upstream_coroutines.append(asyncio.create_task(
|
534
519
|
upstream_task._set_keyval(
|
535
520
|
kwargs=new_kwargs, env_prefix=env_prefix
|
536
521
|
)
|
537
522
|
))
|
538
523
|
# set checker keyval
|
539
|
-
local_env_map = self.get_env_map()
|
524
|
+
# local_env_map = self.get_env_map()
|
540
525
|
checker_coroutines = []
|
541
526
|
for checker_task in self._checkers:
|
542
|
-
checker_task.
|
543
|
-
checker_task.
|
527
|
+
checker_task.add_input(*self._get_inputs())
|
528
|
+
checker_task.add_env(*self._get_envs())
|
544
529
|
checker_coroutines.append(asyncio.create_task(
|
545
530
|
checker_task._set_keyval(
|
546
531
|
kwargs=new_kwargs, env_prefix=env_prefix
|
zrb/task/base_task_composite.py
CHANGED
@@ -66,10 +66,17 @@ class CommonTaskModel():
|
|
66
66
|
self._allow_add_envs = True
|
67
67
|
self._allow_add_env_files = True
|
68
68
|
self._allow_add_inputs = True
|
69
|
+
self._allow_add_upstreams: bool = True
|
70
|
+
self._has_already_inject_env_files: bool = False
|
71
|
+
self._has_already_inject_envs: bool = False
|
72
|
+
self._has_already_inject_inputs: bool = False
|
73
|
+
self._has_already_inject_checkers: bool = False
|
74
|
+
self._has_already_inject_upstreams: bool = False
|
69
75
|
self._execution_id = ''
|
70
76
|
|
71
|
-
def
|
72
|
-
self._execution_id
|
77
|
+
def _set_execution_id(self, execution_id: str):
|
78
|
+
if self._execution_id != '':
|
79
|
+
self._execution_id = execution_id
|
73
80
|
|
74
81
|
def set_name(self, new_name: str):
|
75
82
|
if self._description == self._name:
|
@@ -99,20 +106,45 @@ class CommonTaskModel():
|
|
99
106
|
def set_checking_interval(self, new_checking_interval: Union[float, int]):
|
100
107
|
self._checking_interval = new_checking_interval
|
101
108
|
|
102
|
-
def
|
109
|
+
def insert_input(self, *inputs: AnyInput):
|
103
110
|
if not self._allow_add_inputs:
|
104
|
-
raise Exception(f'Cannot
|
105
|
-
self._inputs
|
111
|
+
raise Exception(f'Cannot insert inputs for `{self._name}`')
|
112
|
+
self._inputs = list(inputs) + list(self._inputs)
|
106
113
|
|
107
|
-
def
|
114
|
+
def add_input(self, *inputs: AnyInput):
|
115
|
+
if not self._allow_add_inputs:
|
116
|
+
raise Exception(f'Cannot add inputs for `{self._name}`')
|
117
|
+
self._inputs = list(self._inputs) + list(inputs)
|
118
|
+
|
119
|
+
def insert_env(self, *envs: Env):
|
120
|
+
if not self._allow_add_envs:
|
121
|
+
raise Exception(f'Cannot insert envs to `{self._name}`')
|
122
|
+
self._envs = list(envs) + list(self._envs)
|
123
|
+
|
124
|
+
def add_env(self, *envs: Env):
|
108
125
|
if not self._allow_add_envs:
|
109
|
-
raise Exception(f'Cannot add envs
|
110
|
-
self._envs
|
126
|
+
raise Exception(f'Cannot add envs to `{self._name}`')
|
127
|
+
self._envs = list(self._envs) + list(envs)
|
111
128
|
|
112
|
-
def
|
129
|
+
def insert_env_file(self, *env_files: EnvFile):
|
113
130
|
if not self._allow_add_env_files:
|
114
|
-
raise Exception(f'Cannot
|
115
|
-
self._env_files
|
131
|
+
raise Exception(f'Cannot insert env_files to `{self._name}`')
|
132
|
+
self._env_files = list(env_files) + list(self._env_files)
|
133
|
+
|
134
|
+
def add_env_file(self, *env_files: EnvFile):
|
135
|
+
if not self._allow_add_env_files:
|
136
|
+
raise Exception(f'Cannot add env_files to `{self._name}`')
|
137
|
+
self._env_files = list(self._env_files) + list(env_files)
|
138
|
+
|
139
|
+
def insert_upstream(self, *upstreams: AnyTask):
|
140
|
+
if not self._allow_add_upstreams:
|
141
|
+
raise Exception(f'Cannot insert upstreams to `{self._name}`')
|
142
|
+
self._upstreams = list(upstreams) + list(self._upstreams)
|
143
|
+
|
144
|
+
def add_upstream(self, *upstreams: AnyTask):
|
145
|
+
if not self._allow_add_upstreams:
|
146
|
+
raise Exception(f'Cannot add upstreams to `{self._name}`')
|
147
|
+
self._upstreams = list(self._upstreams) + list(upstreams)
|
116
148
|
|
117
149
|
def get_execution_id(self) -> str:
|
118
150
|
return self._execution_id
|
@@ -123,20 +155,50 @@ class CommonTaskModel():
|
|
123
155
|
def get_color(self) -> str:
|
124
156
|
return self._color
|
125
157
|
|
126
|
-
def
|
158
|
+
def inject_env_files(self):
|
159
|
+
pass
|
160
|
+
|
161
|
+
def _get_env_files(self) -> List[EnvFile]:
|
162
|
+
if not self._has_already_inject_env_files:
|
163
|
+
self.inject_env_files()
|
164
|
+
self._has_already_inject_env_files = True
|
127
165
|
return self._env_files
|
128
166
|
|
129
|
-
def
|
130
|
-
|
167
|
+
def inject_envs(self):
|
168
|
+
pass
|
169
|
+
|
170
|
+
def _get_envs(self) -> List[Env]:
|
171
|
+
if not self._has_already_inject_envs:
|
172
|
+
self.inject_envs()
|
173
|
+
self._has_already_inject_envs = True
|
174
|
+
return list(self._envs)
|
175
|
+
|
176
|
+
def inject_inputs(self):
|
177
|
+
pass
|
178
|
+
|
179
|
+
def _get_inputs(self) -> List[AnyInput]:
|
180
|
+
if not self._has_already_inject_inputs:
|
181
|
+
self.inject_inputs()
|
182
|
+
self._has_already_inject_inputs = True
|
183
|
+
return list(self._inputs)
|
184
|
+
|
185
|
+
def inject_checkers(self):
|
186
|
+
pass
|
131
187
|
|
132
|
-
def
|
133
|
-
|
188
|
+
def _get_checkers(self) -> List[AnyTask]:
|
189
|
+
if not self._has_already_inject_checkers:
|
190
|
+
self.inject_checkers()
|
191
|
+
self._has_already_inject_checkers = True
|
192
|
+
return list(self._checkers)
|
134
193
|
|
135
|
-
def
|
136
|
-
|
194
|
+
def inject_upstreams(self):
|
195
|
+
pass
|
137
196
|
|
138
|
-
def
|
139
|
-
|
197
|
+
def _get_upstreams(self) -> List[AnyTask]:
|
198
|
+
if not self._has_already_inject_upstreams:
|
199
|
+
self.inject_upstreams()
|
200
|
+
self._has_already_inject_upstreams = True
|
201
|
+
return list(self._upstreams)
|
140
202
|
|
141
203
|
def get_description(self) -> str:
|
142
204
|
return self._description
|
@@ -361,7 +423,7 @@ class TaskModelWithPrinterAndTracker(
|
|
361
423
|
run: Optional[Callable[..., Any]] = None,
|
362
424
|
should_execute: Union[bool, str, Callable[..., bool]] = True
|
363
425
|
):
|
364
|
-
self.
|
426
|
+
self._rjust_full_cmd_name: Optional[str] = None
|
365
427
|
self._has_cli_interface = False
|
366
428
|
self._complete_name: Optional[str] = None
|
367
429
|
CommonTaskModel.__init__(
|
@@ -448,13 +510,13 @@ class TaskModelWithPrinterAndTracker(
|
|
448
510
|
def _get_print_prefix(self) -> str:
|
449
511
|
common_prefix = self._get_common_prefix(show_time=show_time)
|
450
512
|
icon = self.get_icon()
|
451
|
-
truncated_name = self.
|
513
|
+
truncated_name = self._get_rjust_full_cmd_name()
|
452
514
|
return f'{common_prefix} {icon} {truncated_name}'
|
453
515
|
|
454
516
|
def _get_log_prefix(self) -> str:
|
455
517
|
common_prefix = self._get_common_prefix(show_time=False)
|
456
518
|
icon = self.get_icon()
|
457
|
-
filled_name = self.
|
519
|
+
filled_name = self._get_rjust_full_cmd_name()
|
458
520
|
return f'{common_prefix} {icon} {filled_name}'
|
459
521
|
|
460
522
|
def _get_common_prefix(self, show_time: bool) -> str:
|
@@ -466,14 +528,14 @@ class TaskModelWithPrinterAndTracker(
|
|
466
528
|
return f'◷ {now} ❁ {pid} → {attempt}/{max_attempt}'
|
467
529
|
return f'❁ {pid} → {attempt}/{max_attempt}'
|
468
530
|
|
469
|
-
def
|
470
|
-
if self.
|
471
|
-
return self.
|
472
|
-
complete_name = self.
|
473
|
-
self.
|
474
|
-
return self.
|
531
|
+
def _get_rjust_full_cmd_name(self) -> str:
|
532
|
+
if self._rjust_full_cmd_name is not None:
|
533
|
+
return self._rjust_full_cmd_name
|
534
|
+
complete_name = self.get_full_cmd_name()
|
535
|
+
self._rjust_full_cmd_name = complete_name.rjust(LOG_NAME_LENGTH, ' ')
|
536
|
+
return self._rjust_full_cmd_name
|
475
537
|
|
476
|
-
def
|
538
|
+
def get_full_cmd_name(self) -> str:
|
477
539
|
if self._complete_name is not None:
|
478
540
|
return self._complete_name
|
479
541
|
executable_prefix = ''
|
zrb/task/cmd_task.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
from zrb.helper.typing import (
|
2
|
-
Any, Callable, Iterable, List,
|
2
|
+
Any, Callable, Iterable, List, Optional, Union, TypeVar
|
3
3
|
)
|
4
4
|
from zrb.helper.typecheck import typechecked
|
5
5
|
from zrb.task.any_task import AnyTask
|
@@ -182,18 +182,17 @@ class CmdTask(BaseTask):
|
|
182
182
|
return
|
183
183
|
print(result.output)
|
184
184
|
|
185
|
-
def
|
186
|
-
|
185
|
+
def inject_envs(self):
|
186
|
+
super().inject_envs()
|
187
187
|
input_map = self.get_input_map()
|
188
188
|
for input_name, input_value in input_map.items():
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
189
|
+
env_name = '_INPUT_' + input_name.upper()
|
190
|
+
self.add_env(
|
191
|
+
Env(name=env_name, os_name='', default=str(input_value))
|
192
|
+
)
|
193
193
|
|
194
194
|
async def run(self, *args: Any, **kwargs: Any) -> CmdResult:
|
195
|
-
cmd = self.
|
196
|
-
env_map = self._get_shell_env_map()
|
195
|
+
cmd = self.get_cmd_script(*args, **kwargs)
|
197
196
|
self.print_out_dark('Run script: ' + self._get_multiline_repr(cmd))
|
198
197
|
self.print_out_dark('Working directory: ' + self._cwd)
|
199
198
|
self._output_buffer = []
|
@@ -203,7 +202,7 @@ class CmdTask(BaseTask):
|
|
203
202
|
cwd=self._cwd,
|
204
203
|
stdout=asyncio.subprocess.PIPE,
|
205
204
|
stderr=asyncio.subprocess.PIPE,
|
206
|
-
env=
|
205
|
+
env=self.get_env_map(),
|
207
206
|
shell=True,
|
208
207
|
executable=self._executable,
|
209
208
|
close_fds=True,
|
@@ -314,21 +313,25 @@ class CmdTask(BaseTask):
|
|
314
313
|
await stdout_log_process
|
315
314
|
await stderr_log_process
|
316
315
|
|
317
|
-
def
|
318
|
-
return self.
|
316
|
+
def get_cmd_script(self, *args: Any, **kwargs: Any) -> str:
|
317
|
+
return self._create_cmd_script(
|
318
|
+
self._cmd_path, self._cmd, *args, **kwargs
|
319
|
+
)
|
319
320
|
|
320
|
-
def
|
321
|
+
def _create_cmd_script(
|
321
322
|
self, cmd_path: CmdVal, cmd: CmdVal, *args: Any, **kwargs: Any
|
322
323
|
) -> str:
|
323
324
|
if not isinstance(cmd_path, str) or cmd_path != '':
|
324
325
|
if callable(cmd_path):
|
325
|
-
return self.
|
326
|
-
return self.
|
326
|
+
return self._get_rendered_cmd_path(cmd_path(*args, **kwargs))
|
327
|
+
return self._get_rendered_cmd_path(cmd_path)
|
327
328
|
if callable(cmd):
|
328
|
-
return self.
|
329
|
-
return self.
|
329
|
+
return self._get_rendered_cmd(cmd(*args, **kwargs))
|
330
|
+
return self._get_rendered_cmd(cmd)
|
330
331
|
|
331
|
-
def
|
332
|
+
def _get_rendered_cmd_path(
|
333
|
+
self, cmd_path: Union[str, Iterable[str]]
|
334
|
+
) -> str:
|
332
335
|
if isinstance(cmd_path, str):
|
333
336
|
return self.render_file(cmd_path)
|
334
337
|
return '\n'.join([
|
@@ -336,7 +339,7 @@ class CmdTask(BaseTask):
|
|
336
339
|
for cmd_path_str in cmd_path
|
337
340
|
])
|
338
341
|
|
339
|
-
def
|
342
|
+
def _get_rendered_cmd(self, cmd: Union[str, Iterable[str]]) -> str:
|
340
343
|
if isinstance(cmd, str):
|
341
344
|
return self.render_str(cmd)
|
342
345
|
return self.render_str('\n'.join(list(cmd)))
|
zrb/task/docker_compose_task.py
CHANGED
@@ -153,7 +153,8 @@ class DockerComposeTask(CmdTask):
|
|
153
153
|
)
|
154
154
|
# Flag to make mark whether service config and compose environments
|
155
155
|
# has been added to this task's envs and env_files
|
156
|
-
self.
|
156
|
+
self._is_compose_additional_env_added = False
|
157
|
+
self._is_compose_additional_env_file_added = False
|
157
158
|
|
158
159
|
def copy(self) -> TDockerComposeTask:
|
159
160
|
return super().copy()
|
@@ -166,45 +167,30 @@ class DockerComposeTask(CmdTask):
|
|
166
167
|
os.remove(self._compose_runtime_file)
|
167
168
|
return result
|
168
169
|
|
169
|
-
def
|
170
|
-
|
171
|
-
|
172
|
-
Whenever _get_all_envs is called, we want to make sure that:
|
173
|
-
- Service config's envs and env_files are included
|
174
|
-
- Any environment defined in docker compose file is also included
|
175
|
-
'''
|
176
|
-
if self._is_additional_env_added:
|
177
|
-
return super()._get_all_envs()
|
178
|
-
self._is_additional_env_added = True
|
179
|
-
# define additional envs and additonal env_files
|
180
|
-
additional_envs: List[Env] = []
|
181
|
-
additional_env_files: List[EnvFile] = []
|
182
|
-
# populate additional envs and additional env_files
|
183
|
-
# with service configs
|
170
|
+
def inject_envs(self):
|
171
|
+
super().inject_envs()
|
172
|
+
# inject envs from service_configs
|
184
173
|
for _, service_config in self._compose_service_configs.items():
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
data = read_compose_file(self._compose_template_file)
|
190
|
-
env_map = fetch_compose_file_env_map(data)
|
174
|
+
self.insert_env(*service_config.get_envs())
|
175
|
+
# inject envs from docker compose file
|
176
|
+
compose_data = read_compose_file(self._compose_template_file)
|
177
|
+
env_map = fetch_compose_file_env_map(compose_data)
|
191
178
|
added_env_map: Mapping[str, bool] = {}
|
192
179
|
for key, value in env_map.items():
|
193
180
|
# Need to get this everytime because we only want
|
194
181
|
# the first compose file env value for a certain key
|
195
182
|
if key in RESERVED_ENV_NAMES or key in added_env_map:
|
196
183
|
continue
|
184
|
+
added_env_map[key] = True
|
197
185
|
os_name = key
|
198
186
|
if self._compose_env_prefix != '':
|
199
187
|
os_name = f'{self._compose_env_prefix}_{os_name}'
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
#
|
204
|
-
|
205
|
-
|
206
|
-
# get all envs
|
207
|
-
return super()._get_all_envs()
|
188
|
+
self.insert_env(Env(name=key, os_name=os_name, default=value))
|
189
|
+
|
190
|
+
def inject_env_files(self):
|
191
|
+
# inject env_files from service_configs
|
192
|
+
for _, service_config in self._compose_service_configs.items():
|
193
|
+
self.insert_env_file(*service_config.get_env_files())
|
208
194
|
|
209
195
|
def _generate_compose_runtime_file(self):
|
210
196
|
compose_data = read_compose_file(self._compose_template_file)
|
@@ -311,8 +297,8 @@ class DockerComposeTask(CmdTask):
|
|
311
297
|
return os.path.join(self._cwd, compose_file)
|
312
298
|
raise Exception(f'Invalid compose file: {compose_file}')
|
313
299
|
|
314
|
-
def
|
315
|
-
setup_cmd_str = self.
|
300
|
+
def get_cmd_script(self, *args: Any, **kwargs: Any) -> str:
|
301
|
+
setup_cmd_str = self._create_cmd_script(
|
316
302
|
self._setup_cmd_path, self._setup_cmd, *args, **kwargs
|
317
303
|
)
|
318
304
|
command_options = dict(self._compose_options)
|
zrb/task/flow_task.py
CHANGED
@@ -107,10 +107,10 @@ class FlowTask(BaseTask):
|
|
107
107
|
embeded_tasks: List[AnyTask] = []
|
108
108
|
for task in tasks:
|
109
109
|
embeded_task = task.copy()
|
110
|
-
embeded_task.
|
111
|
-
embeded_task.
|
112
|
-
embeded_task.
|
113
|
-
embeded_task.
|
110
|
+
embeded_task.add_upstream(*upstreams)
|
111
|
+
embeded_task.add_env(*envs)
|
112
|
+
embeded_task.add_env_file(*env_files)
|
113
|
+
embeded_task.add_input(*inputs)
|
114
114
|
embeded_tasks.append(embeded_task)
|
115
115
|
return embeded_tasks
|
116
116
|
|
@@ -3,13 +3,13 @@ zrb/__main__.py,sha256=CdfuYSxqlJhnsJPOBOL2_uzEaTZHC3MtpyTuz8QUfUI,314
|
|
3
3
|
zrb/advertisement.py,sha256=e-1tFPlmEuz8IqaIJ_9-2p9x5cuGsxssJGu5F0wHthI,505
|
4
4
|
zrb/runner.py,sha256=MPCNPMCyiYNZeubSxd1eM2Zr6PCIKF-9pkG385AXElw,118
|
5
5
|
zrb/action/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
zrb/action/runner.py,sha256=
|
6
|
+
zrb/action/runner.py,sha256=JPWERMBRS7FW9Z1m1P2pI0farvdmA6fwX9NyZGJr6Dg,4476
|
7
7
|
zrb/builtin/__init__.py,sha256=VpmpsDJmL2Qe1MDiVTaGgGgW9MxRz8sR21Blclg6MDE,580
|
8
8
|
zrb/builtin/base64.py,sha256=_Ff8eQi0pMa4qqDUqZqA-u-2LpSA5s3AN0Nj2M7ibnQ,1318
|
9
9
|
zrb/builtin/env.py,sha256=hEjQios0i-3DantczxQnZnolzwZAGIQOE0Ygka330EU,1146
|
10
10
|
zrb/builtin/eval.py,sha256=FjAeWuD6KdvSKwsoUo8qbSO9qgc0rQVmRNib-XKOfVc,745
|
11
11
|
zrb/builtin/explain.py,sha256=ee2UjBS-J5-Hf9JDEQR_vs056NiMZCCHtLvE_rrW4AU,5377
|
12
|
-
zrb/builtin/git.py,sha256=
|
12
|
+
zrb/builtin/git.py,sha256=VIhXv8LV12vysSJYitW26mU5p6x9bmTCYknAM4Qu1h0,2616
|
13
13
|
zrb/builtin/group.py,sha256=ncUsZcGRUF9QKNMt-_1zDNDi4Z2KA5jpjwEuYIzhKmo,1077
|
14
14
|
zrb/builtin/md5.py,sha256=IWN0uroXRiuyF0wD05BzGqAkMA3p6q9EbtWmJOPdOc0,1376
|
15
15
|
zrb/builtin/process.py,sha256=h7uMfEIqbOaNe8aTINZYYbHWw7mmUF8DkeiylPeWzSE,1281
|
@@ -1102,7 +1102,7 @@ zrb/helper/util.py,sha256=82LBcWV8vAnMnYYIfnKq27EfaY_ATxLNJpcePe7VwQI,3469
|
|
1102
1102
|
zrb/helper/accessories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1103
1103
|
zrb/helper/accessories/color.py,sha256=2G_Ys_iFF7hnnbeLqO3YRBGiYdxnduk0CMcyz4Y8dgg,709
|
1104
1104
|
zrb/helper/accessories/icon.py,sha256=hCL8tSvxxRy7PTKQXsvS4oTPyrP87Zn5RoBgsCq-NLs,347
|
1105
|
-
zrb/helper/accessories/name.py,sha256=
|
1105
|
+
zrb/helper/accessories/name.py,sha256=DoSTf6SjWOP0GEzWvIalcJeuft8C19v09vfJ1MotTuE,2043
|
1106
1106
|
zrb/helper/codemod/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1107
1107
|
zrb/helper/codemod/add_argument_to_function.py,sha256=5tuDqcMMozANchrHuUspH5MlRdQj5nw_mwhCzEXb0qY,1265
|
1108
1108
|
zrb/helper/codemod/add_argument_to_function_call.py,sha256=aqQxpmbFbtejJPdjG7v1QIwsaBUT0v_M9ZGhTSxIFKU,1041
|
@@ -1117,7 +1117,7 @@ zrb/helper/codemod/format_code.py,sha256=ymxZtZm-5RuaddLUu8LJgguX0n8CJSbHb-McQDU
|
|
1117
1117
|
zrb/helper/docker_compose/fetch_external_env.py,sha256=pIXkMCXtDXVWdNPlpMolqdj4Q0Y73dhCeqwByCB6mWg,2042
|
1118
1118
|
zrb/helper/docker_compose/file.py,sha256=aBtQMV57TWtMO9AwsZ2OyBn16MhElZaDlq54zBqYBnA,685
|
1119
1119
|
zrb/helper/env_map/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1120
|
-
zrb/helper/env_map/fetch.py,sha256=
|
1120
|
+
zrb/helper/env_map/fetch.py,sha256=Nl243-dcIEpbImAveZAXo2l0IGNXxD5RN_CyxGYTZeo,2173
|
1121
1121
|
zrb/helper/file/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1122
1122
|
zrb/helper/file/copy_tree.py,sha256=4kVqupzLYyF_neiRsedAFbxkeiK0VYsW45Z2zCkWLXA,1804
|
1123
1123
|
zrb/helper/file/text.py,sha256=_S1uYToMw3lcI95-op_kM_SWNJUyvYNc32XHIcokDWU,807
|
@@ -1137,18 +1137,18 @@ zrb/shell-scripts/_common-util.sh,sha256=6WPPOp_NBUgIMd1K2qlVZ6iYzZ-Xl3lUTzi4Rqr
|
|
1137
1137
|
zrb/shell-scripts/ensure-docker-is-installed.sh,sha256=CpfGjfoXFXoTWXsONIGZCMnmtFrk6ZamvO_8Fqp_WJ0,2893
|
1138
1138
|
zrb/shell-scripts/ensure-rsync-is-installed.sh,sha256=vHJWNEidemIrM2tQ17r5qwSUjz9hVKcjYbUEMo3pPJI,987
|
1139
1139
|
zrb/shell-scripts/ensure-ssh-is-installed.sh,sha256=TM0PLXT2vNfgv2ffcW_l-IqtMqHI1Z9nGdJvlToUlyM,2092
|
1140
|
-
zrb/shell-scripts/rsync-util.sh,sha256=
|
1140
|
+
zrb/shell-scripts/rsync-util.sh,sha256=QzdhSBvUNMxB4U2B4m0Dxg9czGckRjB7Vk4A1ObG0-k,353
|
1141
1141
|
zrb/shell-scripts/ssh-util.sh,sha256=9lXDzw6oO8HuA4vdbfps_uQMMwKyNYX9fZkZgpK52g8,401
|
1142
1142
|
zrb/task/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1143
|
-
zrb/task/any_task.py,sha256=
|
1143
|
+
zrb/task/any_task.py,sha256=fViLjv35ZAuQxBjArv52E6LJgv9vvgihCGEPuiEgv_4,6238
|
1144
1144
|
zrb/task/any_task_event_handler.py,sha256=vpO9t0fck8-oFu1KYptfcg2hXKRsk6V5je4Dg-Bl21o,359
|
1145
|
-
zrb/task/base_remote_cmd_task.py,sha256=
|
1146
|
-
zrb/task/base_task.py,sha256=
|
1147
|
-
zrb/task/base_task_composite.py,sha256=
|
1148
|
-
zrb/task/cmd_task.py,sha256=
|
1145
|
+
zrb/task/base_remote_cmd_task.py,sha256=M0915WLSjokKrfdLdPhEtXRPKTG1BfWMRTQLEzj6hL4,8930
|
1146
|
+
zrb/task/base_task.py,sha256=HxMUb1Iqe4lLOkoSwxCNmRCk2ZE5FoYXmtW8IDy9DkY,21068
|
1147
|
+
zrb/task/base_task_composite.py,sha256=mkw6lSYnDqtO5a9y6HGfCWwBcQOfCx-gX8l0-DurC4Q,18756
|
1148
|
+
zrb/task/cmd_task.py,sha256=g96LPvWNoYoqGuo4V7ZrzGk8_witf4J0eIKMInwIjvM,12758
|
1149
1149
|
zrb/task/decorator.py,sha256=6mJuDhmyHnVwx8SzBf8el5KwYJdA06VTeb1BABgLmTc,2399
|
1150
|
-
zrb/task/docker_compose_task.py,sha256=
|
1151
|
-
zrb/task/flow_task.py,sha256=
|
1150
|
+
zrb/task/docker_compose_task.py,sha256=aytg_c2_gDyhCIRxGmJONicz_Gw8QPVKWdFCV8rOngI,13152
|
1151
|
+
zrb/task/flow_task.py,sha256=lagR8S2tM3y7k5GFoo6qhr9rLJHGCjvVciwMMRxhpzg,3929
|
1152
1152
|
zrb/task/http_checker.py,sha256=ajsBDRgpp2OMeLlgyCL15UECYr2SoKAWfU3PGOJY24Q,5519
|
1153
1153
|
zrb/task/path_checker.py,sha256=EhPJHDPYGAJG3XPUaiN_iN9Y-vtf96gEsWwqagy4IIM,3879
|
1154
1154
|
zrb/task/port_checker.py,sha256=bZ7JPSNoZ1zyZsS05tL4y7soKRbjyU0u3LXsPOE5w7I,4398
|
@@ -1172,8 +1172,8 @@ zrb/task_input/int_input.py,sha256=mtNrgs65SL0GCzW5qr6c869UjiJ__zJaiXmJZCaqIJs,1
|
|
1172
1172
|
zrb/task_input/password_input.py,sha256=5bkUWyPumryigIy-S_z3nBDCo8sQB8_5PeS_gvPI0HQ,1611
|
1173
1173
|
zrb/task_input/str_input.py,sha256=7cubJJKLCWRoGIRIM0_0WUhya18wvURoytrhVZA4xYI,1592
|
1174
1174
|
zrb/task_input/task_input.py,sha256=HotqM1iYSzwE4PIj8grnEUsvJqjx1dS6Ek7i6ZJLq2Y,83
|
1175
|
-
zrb-0.0.
|
1176
|
-
zrb-0.0.
|
1177
|
-
zrb-0.0.
|
1178
|
-
zrb-0.0.
|
1179
|
-
zrb-0.0.
|
1175
|
+
zrb-0.0.110.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
|
1176
|
+
zrb-0.0.110.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
|
1177
|
+
zrb-0.0.110.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
1178
|
+
zrb-0.0.110.dist-info/METADATA,sha256=YIIg3sAs_V0P_U2aFDdowyznVCsNB1CAdt04_erUeBA,9740
|
1179
|
+
zrb-0.0.110.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|