zrb 0.26.2__py3-none-any.whl → 0.27.1__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/__init__.py +0 -3
- zrb/task/docker_compose_task.py +26 -26
- zrb/task/remote_cmd_task.py +55 -18
- zrb/task/rsync_task.py +57 -23
- {zrb-0.26.2.dist-info → zrb-0.27.1.dist-info}/METADATA +2 -2
- {zrb-0.26.2.dist-info → zrb-0.27.1.dist-info}/RECORD +9 -12
- zrb/shell-scripts/rsync-util.sh +0 -12
- zrb/shell-scripts/ssh-util.sh +0 -12
- zrb/task/base_remote_cmd_task.py +0 -354
- {zrb-0.26.2.dist-info → zrb-0.27.1.dist-info}/LICENSE +0 -0
- {zrb-0.26.2.dist-info → zrb-0.27.1.dist-info}/WHEEL +0 -0
- {zrb-0.26.2.dist-info → zrb-0.27.1.dist-info}/entry_points.txt +0 -0
zrb/__init__.py
CHANGED
@@ -10,7 +10,6 @@ from zrb.task.any_task_event_handler import (
|
|
10
10
|
OnTriggered,
|
11
11
|
OnWaiting,
|
12
12
|
)
|
13
|
-
from zrb.task.base_remote_cmd_task import BaseRemoteCmdTask, RemoteConfig
|
14
13
|
from zrb.task.checker import Checker
|
15
14
|
from zrb.task.cmd_task import CmdTask
|
16
15
|
from zrb.task.decorator import python_task
|
@@ -69,8 +68,6 @@ assert CmdTask
|
|
69
68
|
assert DockerComposeTask
|
70
69
|
assert DockerComposeStartTask
|
71
70
|
assert ServiceConfig
|
72
|
-
assert BaseRemoteCmdTask
|
73
|
-
assert RemoteConfig
|
74
71
|
assert RemoteCmdTask
|
75
72
|
assert RsyncTask
|
76
73
|
assert Notifier
|
zrb/task/docker_compose_task.py
CHANGED
@@ -33,32 +33,33 @@ from zrb.task_input.any_input import AnyInput
|
|
33
33
|
|
34
34
|
logger.debug(colored("Loading zrb.task.docker_compose_task", attrs=["dark"]))
|
35
35
|
|
36
|
+
TDockerComposeTask = TypeVar("TDockerComposeTask", bound="DockerComposeTask")
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
SHELL_SCRIPT_DIR = os.path.join(CURRENT_DIR, "..", "shell-scripts")
|
40
|
-
ensure_container_backend = CmdTask(
|
41
|
-
name="ensure-compose-backend",
|
42
|
-
cmd_path=[
|
43
|
-
os.path.join(SHELL_SCRIPT_DIR, "_common-util.sh"),
|
44
|
-
os.path.join(SHELL_SCRIPT_DIR, f"ensure-{backend}-is-installed.sh"),
|
45
|
-
],
|
46
|
-
preexec_fn=None,
|
47
|
-
should_print_cmd_result=False,
|
48
|
-
)
|
49
|
-
return CmdTask(
|
50
|
-
name="ensure-zrb-network",
|
51
|
-
cmd=[
|
52
|
-
f"{backend} network inspect zrb >/dev/null 2>&1 || \\",
|
53
|
-
f"{backend} network create -d bridge zrb",
|
54
|
-
],
|
55
|
-
upstreams=[ensure_container_backend],
|
56
|
-
should_print_cmd_result=False,
|
57
|
-
)
|
58
|
-
|
38
|
+
CURRENT_DIR = os.path.dirname(__file__)
|
39
|
+
SHELL_SCRIPT_DIR = os.path.join(CURRENT_DIR, "..", "shell-scripts")
|
59
40
|
|
60
|
-
|
61
|
-
|
41
|
+
ensure_container_backend = CmdTask(
|
42
|
+
name="ensure-compose-backend",
|
43
|
+
cmd_path=[
|
44
|
+
os.path.join(SHELL_SCRIPT_DIR, "_common-util.sh"),
|
45
|
+
os.path.join(SHELL_SCRIPT_DIR, f"ensure-{CONTAINER_BACKEND}-is-installed.sh"),
|
46
|
+
],
|
47
|
+
preexec_fn=None,
|
48
|
+
should_print_cmd_result=False,
|
49
|
+
should_show_cmd=False,
|
50
|
+
should_show_working_directory=False,
|
51
|
+
)
|
52
|
+
ensure_zrb_network_task = CmdTask(
|
53
|
+
name="ensure-zrb-network",
|
54
|
+
cmd=[
|
55
|
+
f"{CONTAINER_BACKEND} network inspect zrb >/dev/null 2>&1 || \\",
|
56
|
+
f"{CONTAINER_BACKEND} network create -d bridge zrb",
|
57
|
+
],
|
58
|
+
upstreams=[ensure_container_backend],
|
59
|
+
should_print_cmd_result=False,
|
60
|
+
should_show_cmd=False,
|
61
|
+
should_show_working_directory=False,
|
62
|
+
)
|
62
63
|
|
63
64
|
|
64
65
|
@typechecked
|
@@ -120,14 +121,13 @@ class DockerComposeTask(CmdTask):
|
|
120
121
|
should_show_cmd: bool = True,
|
121
122
|
should_show_working_directory: bool = True,
|
122
123
|
):
|
123
|
-
combined_env_files = list(env_files)
|
124
124
|
CmdTask.__init__(
|
125
125
|
self,
|
126
126
|
name=name,
|
127
127
|
group=group,
|
128
128
|
inputs=inputs,
|
129
129
|
envs=envs,
|
130
|
-
env_files=
|
130
|
+
env_files=env_files,
|
131
131
|
icon=icon,
|
132
132
|
color=color,
|
133
133
|
description=description,
|
zrb/task/remote_cmd_task.py
CHANGED
@@ -6,6 +6,7 @@ from typing import Any, Optional, Union
|
|
6
6
|
from zrb.helper.accessories.color import colored
|
7
7
|
from zrb.helper.log import logger
|
8
8
|
from zrb.helper.typecheck import typechecked
|
9
|
+
from zrb.helper.typing import JinjaTemplate
|
9
10
|
from zrb.task.any_task import AnyTask
|
10
11
|
from zrb.task.any_task_event_handler import (
|
11
12
|
OnFailed,
|
@@ -16,9 +17,8 @@ from zrb.task.any_task_event_handler import (
|
|
16
17
|
OnTriggered,
|
17
18
|
OnWaiting,
|
18
19
|
)
|
19
|
-
from zrb.task.base_remote_cmd_task import BaseRemoteCmdTask, RemoteConfig
|
20
20
|
from zrb.task.cmd_task import CmdTask, CmdVal
|
21
|
-
from zrb.task_env.env import Env
|
21
|
+
from zrb.task_env.env import Env, PrivateEnv
|
22
22
|
from zrb.task_env.env_file import EnvFile
|
23
23
|
from zrb.task_group.group import Group
|
24
24
|
from zrb.task_input.any_input import AnyInput
|
@@ -27,8 +27,6 @@ logger.debug(colored("Loading zrb.task.remote_cmd_task", attrs=["dark"]))
|
|
27
27
|
|
28
28
|
_CURRENT_DIR = os.path.dirname(__file__)
|
29
29
|
_SHELL_SCRIPT_DIR = os.path.join(_CURRENT_DIR, "..", "shell-scripts")
|
30
|
-
with open(os.path.join(_SHELL_SCRIPT_DIR, "ssh-util.sh")) as file:
|
31
|
-
_SSH_UTIL_SCRIPT = file.read()
|
32
30
|
|
33
31
|
ensure_ssh_is_installed = CmdTask(
|
34
32
|
name="ensure-ssh-is-installed",
|
@@ -37,15 +35,17 @@ ensure_ssh_is_installed = CmdTask(
|
|
37
35
|
os.path.join(_SHELL_SCRIPT_DIR, "ensure-ssh-is-installed.sh"),
|
38
36
|
],
|
39
37
|
preexec_fn=None,
|
38
|
+
should_print_cmd_result=False,
|
39
|
+
should_show_cmd=False,
|
40
|
+
should_show_working_directory=False,
|
40
41
|
)
|
41
42
|
|
42
43
|
|
43
44
|
@typechecked
|
44
|
-
class RemoteCmdTask(
|
45
|
+
class RemoteCmdTask(CmdTask):
|
45
46
|
def __init__(
|
46
47
|
self,
|
47
48
|
name: str,
|
48
|
-
remote_configs: Iterable[RemoteConfig],
|
49
49
|
group: Optional[Group] = None,
|
50
50
|
inputs: Iterable[AnyInput] = [],
|
51
51
|
envs: Iterable[Env] = [],
|
@@ -54,9 +54,15 @@ class RemoteCmdTask(BaseRemoteCmdTask):
|
|
54
54
|
color: Optional[str] = None,
|
55
55
|
description: str = "",
|
56
56
|
executable: Optional[str] = None,
|
57
|
+
remote_host: JinjaTemplate = "localhost",
|
58
|
+
remote_port: Union[JinjaTemplate, int] = 22,
|
59
|
+
remote_user: JinjaTemplate = "root",
|
60
|
+
remote_password: JinjaTemplate = "",
|
61
|
+
remote_ssh_key: JinjaTemplate = "",
|
57
62
|
cmd: CmdVal = "",
|
58
63
|
cmd_path: CmdVal = "",
|
59
64
|
cwd: Optional[Union[str, pathlib.Path]] = None,
|
65
|
+
should_render_cwd: bool = True,
|
60
66
|
upstreams: Iterable[AnyTask] = [],
|
61
67
|
fallbacks: Iterable[AnyTask] = [],
|
62
68
|
on_triggered: Optional[OnTriggered] = None,
|
@@ -74,31 +80,26 @@ class RemoteCmdTask(BaseRemoteCmdTask):
|
|
74
80
|
max_error_line: int = 1000,
|
75
81
|
preexec_fn: Optional[Callable[[], Any]] = os.setsid,
|
76
82
|
should_execute: Union[bool, str, Callable[..., bool]] = True,
|
83
|
+
return_upstream_result: bool = False,
|
84
|
+
should_print_cmd_result: bool = True,
|
85
|
+
should_show_cmd: bool = True,
|
86
|
+
should_show_working_directory: bool = True,
|
77
87
|
):
|
78
|
-
|
79
|
-
[
|
80
|
-
_SSH_UTIL_SCRIPT,
|
81
|
-
"_SCRIPT=\"$(cat <<'ENDSCRIPT'",
|
82
|
-
]
|
83
|
-
)
|
84
|
-
post_cmd = "\n".join(["ENDSCRIPT", ')"', 'auth_ssh "$_SCRIPT"'])
|
85
|
-
BaseRemoteCmdTask.__init__(
|
88
|
+
CmdTask.__init__(
|
86
89
|
self,
|
87
90
|
name=name,
|
88
|
-
remote_configs=remote_configs,
|
89
91
|
group=group,
|
90
92
|
inputs=inputs,
|
91
|
-
envs=envs,
|
93
|
+
envs=envs + [PrivateEnv(name="_ZRB_SSH_PASSWORD", default=remote_password)],
|
92
94
|
env_files=env_files,
|
93
95
|
icon=icon,
|
94
96
|
color=color,
|
95
97
|
description=description,
|
96
98
|
executable=executable,
|
97
|
-
pre_cmd=pre_cmd,
|
98
99
|
cmd=cmd,
|
99
100
|
cmd_path=cmd_path,
|
100
|
-
post_cmd=post_cmd,
|
101
101
|
cwd=cwd,
|
102
|
+
should_render_cwd=should_render_cwd,
|
102
103
|
upstreams=[ensure_ssh_is_installed] + upstreams,
|
103
104
|
fallbacks=fallbacks,
|
104
105
|
on_triggered=on_triggered,
|
@@ -116,4 +117,40 @@ class RemoteCmdTask(BaseRemoteCmdTask):
|
|
116
117
|
max_error_line=max_error_line,
|
117
118
|
preexec_fn=preexec_fn,
|
118
119
|
should_execute=should_execute,
|
120
|
+
return_upstream_result=return_upstream_result,
|
121
|
+
should_print_cmd_result=should_print_cmd_result,
|
122
|
+
should_show_cmd=should_show_cmd,
|
123
|
+
should_show_working_directory=should_show_working_directory,
|
124
|
+
)
|
125
|
+
self._remote_host = remote_host
|
126
|
+
self._remote_port = remote_port
|
127
|
+
self._remote_user = remote_user
|
128
|
+
self._remote_password = remote_password
|
129
|
+
self._remote_ssh_key = remote_ssh_key
|
130
|
+
|
131
|
+
def get_cmd_script(self, *args: Any, **kwargs: Any) -> str:
|
132
|
+
cmd_script = self._create_cmd_script(self._cmd_path, self._cmd, *args, **kwargs)
|
133
|
+
cmd_script = "\n".join(
|
134
|
+
[
|
135
|
+
"_SCRIPT=$(cat << 'ENDSCRIPT'",
|
136
|
+
cmd_script,
|
137
|
+
"ENDSCRIPT",
|
138
|
+
")",
|
139
|
+
]
|
119
140
|
)
|
141
|
+
ssh_command = self._get_ssh_command()
|
142
|
+
return "\n".join([cmd_script, ssh_command])
|
143
|
+
|
144
|
+
def _get_ssh_command(self) -> str:
|
145
|
+
host = self.render_str(self._remote_host)
|
146
|
+
port = self.render_str(self._remote_port)
|
147
|
+
user = self.render_str(self._remote_user)
|
148
|
+
password = self.render_str(self._remote_password)
|
149
|
+
key = self.render_str(self._remote_ssh_key)
|
150
|
+
if key != "" and password != "":
|
151
|
+
return f'sshpass -p "$_ZRB_SSH_PASSWORD" ssh -t -p "{port}" -i "{key}" "{user}@{host}" "$_SCRIPT"' # noqa
|
152
|
+
if key != "":
|
153
|
+
return f'ssh -t -p "{port}" -i "{key}" "{user}@{host}" "$_SCRIPT"'
|
154
|
+
if password != "":
|
155
|
+
return f'sshpass -p "$_ZRB_SSH_PASSWORD" ssh -t -p "{port}" "{user}@{host}" "$_SCRIPT"' # noqa
|
156
|
+
return f'ssh -t -p "{port}" "{user}@{host}" "$_SCRIPT"'
|
zrb/task/rsync_task.py
CHANGED
@@ -17,9 +17,8 @@ from zrb.task.any_task_event_handler import (
|
|
17
17
|
OnTriggered,
|
18
18
|
OnWaiting,
|
19
19
|
)
|
20
|
-
from zrb.task.base_remote_cmd_task import BaseRemoteCmdTask, RemoteConfig
|
21
20
|
from zrb.task.cmd_task import CmdTask
|
22
|
-
from zrb.task_env.env import Env
|
21
|
+
from zrb.task_env.env import Env, PrivateEnv
|
23
22
|
from zrb.task_env.env_file import EnvFile
|
24
23
|
from zrb.task_group.group import Group
|
25
24
|
from zrb.task_input.any_input import AnyInput
|
@@ -28,8 +27,6 @@ logger.debug(colored("Loading zrb.task.rsync_task", attrs=["dark"]))
|
|
28
27
|
|
29
28
|
_CURRENT_DIR = os.path.dirname(__file__)
|
30
29
|
_SHELL_SCRIPT_DIR = os.path.join(_CURRENT_DIR, "..", "shell-scripts")
|
31
|
-
with open(os.path.join(_SHELL_SCRIPT_DIR, "rsync-util.sh")) as file:
|
32
|
-
_RSYNC_UTIL_SCRIPT = file.read()
|
33
30
|
|
34
31
|
ensure_rsync_is_installed = CmdTask(
|
35
32
|
name="ensure-ssh-is-installed",
|
@@ -39,19 +36,17 @@ ensure_rsync_is_installed = CmdTask(
|
|
39
36
|
os.path.join(_SHELL_SCRIPT_DIR, "ensure-rsync-is-installed.sh"),
|
40
37
|
],
|
41
38
|
preexec_fn=None,
|
39
|
+
should_print_cmd_result=False,
|
40
|
+
should_show_cmd=False,
|
41
|
+
should_show_working_directory=False,
|
42
42
|
)
|
43
43
|
|
44
44
|
|
45
45
|
@typechecked
|
46
|
-
class RsyncTask(
|
46
|
+
class RsyncTask(CmdTask):
|
47
47
|
def __init__(
|
48
48
|
self,
|
49
49
|
name: str,
|
50
|
-
remote_configs: Iterable[RemoteConfig],
|
51
|
-
src: JinjaTemplate,
|
52
|
-
dst: JinjaTemplate,
|
53
|
-
src_is_remote: bool = False,
|
54
|
-
dst_is_remote: bool = True,
|
55
50
|
group: Optional[Group] = None,
|
56
51
|
inputs: Iterable[AnyInput] = [],
|
57
52
|
envs: Iterable[Env] = [],
|
@@ -60,7 +55,17 @@ class RsyncTask(BaseRemoteCmdTask):
|
|
60
55
|
color: Optional[str] = None,
|
61
56
|
description: str = "",
|
62
57
|
executable: Optional[str] = None,
|
63
|
-
|
58
|
+
remote_host: JinjaTemplate = "localhost",
|
59
|
+
remote_port: Union[JinjaTemplate, int] = 22,
|
60
|
+
remote_user: JinjaTemplate = "root",
|
61
|
+
remote_password: JinjaTemplate = "",
|
62
|
+
remote_ssh_key: JinjaTemplate = "",
|
63
|
+
src_path: JinjaTemplate = ".",
|
64
|
+
src_is_remote: bool = False,
|
65
|
+
dst_path: JinjaTemplate = ".",
|
66
|
+
dst_is_remote: bool = True,
|
67
|
+
cwd: Optional[Union[JinjaTemplate, pathlib.Path]] = None,
|
68
|
+
should_render_cwd: bool = True,
|
64
69
|
upstreams: Iterable[AnyTask] = [],
|
65
70
|
fallbacks: Iterable[AnyTask] = [],
|
66
71
|
on_triggered: Optional[OnTriggered] = None,
|
@@ -78,25 +83,24 @@ class RsyncTask(BaseRemoteCmdTask):
|
|
78
83
|
max_error_line: int = 1000,
|
79
84
|
preexec_fn: Optional[Callable[[], Any]] = os.setsid,
|
80
85
|
should_execute: Union[bool, str, Callable[..., bool]] = True,
|
86
|
+
return_upstream_result: bool = False,
|
87
|
+
should_print_cmd_result: bool = True,
|
88
|
+
should_show_cmd: bool = True,
|
89
|
+
should_show_working_directory: bool = True,
|
81
90
|
):
|
82
|
-
|
83
|
-
parsed_dst = self._get_parsed_path(dst_is_remote, dst)
|
84
|
-
cmd = f'auth_rsync "{parsed_src}" "{parsed_dst}"'
|
85
|
-
BaseRemoteCmdTask.__init__(
|
91
|
+
CmdTask.__init__(
|
86
92
|
self,
|
87
93
|
name=name,
|
88
|
-
remote_configs=remote_configs,
|
89
94
|
group=group,
|
90
95
|
inputs=inputs,
|
91
|
-
envs=envs,
|
96
|
+
envs=envs + [PrivateEnv(name="_ZRB_SSH_PASSWORD", default=remote_password)],
|
92
97
|
env_files=env_files,
|
93
98
|
icon=icon,
|
94
99
|
color=color,
|
95
100
|
description=description,
|
96
101
|
executable=executable,
|
97
|
-
pre_cmd=_RSYNC_UTIL_SCRIPT,
|
98
|
-
cmd=cmd,
|
99
102
|
cwd=cwd,
|
103
|
+
should_render_cwd=should_render_cwd,
|
100
104
|
upstreams=[ensure_rsync_is_installed] + upstreams,
|
101
105
|
fallbacks=fallbacks,
|
102
106
|
on_triggered=on_triggered,
|
@@ -114,9 +118,39 @@ class RsyncTask(BaseRemoteCmdTask):
|
|
114
118
|
max_error_line=max_error_line,
|
115
119
|
preexec_fn=preexec_fn,
|
116
120
|
should_execute=should_execute,
|
121
|
+
return_upstream_result=return_upstream_result,
|
122
|
+
should_print_cmd_result=should_print_cmd_result,
|
123
|
+
should_show_cmd=should_show_cmd,
|
124
|
+
should_show_working_directory=should_show_working_directory,
|
117
125
|
)
|
126
|
+
self._remote_host = remote_host
|
127
|
+
self._remote_port = remote_port
|
128
|
+
self._remote_user = remote_user
|
129
|
+
self._remote_password = remote_password
|
130
|
+
self._remote_ssh_key = remote_ssh_key
|
131
|
+
self._src_path = src_path
|
132
|
+
self._src_is_remote = src_is_remote
|
133
|
+
self._dst_path = dst_path
|
134
|
+
self._dst_is_remote = dst_is_remote
|
135
|
+
|
136
|
+
def get_cmd_script(self, *args: Any, **kwargs: Any) -> str:
|
137
|
+
port = self.render_str(self._remote_port)
|
138
|
+
password = self.render_str(self._remote_password)
|
139
|
+
key = self.render_str(self._remote_ssh_key)
|
140
|
+
src = self._get_path(self._src_path, self._src_is_remote)
|
141
|
+
dst = self._get_path(self._dst_path, self._dst_is_remote)
|
142
|
+
if key != "" and password != "":
|
143
|
+
return f'sshpass -p "$_ZRB_SSH_PASSWORD" rsync --mkpath -avz -e "ssh -i {key} -p {port}" {src} {dst}' # noqa
|
144
|
+
if key != "":
|
145
|
+
return f'rsync --mkpath -avz -e "ssh -i {key} -p {port}" {src} {dst}'
|
146
|
+
if password != "":
|
147
|
+
return f'sshpass -p "$_ZRB_SSH_PASSWORD" rsync --mkpath -avz -e "ssh -p {port}" {src} {dst}' # noqa
|
148
|
+
return f'rsync --mkpath -avz -e "ssh -p {port}" {src} {dst}'
|
118
149
|
|
119
|
-
def
|
120
|
-
|
121
|
-
|
122
|
-
|
150
|
+
def _get_path(self, resource_path: str, is_remote: bool) -> str:
|
151
|
+
rendered_path = self.render_str(resource_path)
|
152
|
+
if is_remote:
|
153
|
+
host = self.render_str(self._remote_host)
|
154
|
+
user = self.render_str(self._remote_user)
|
155
|
+
return f"{user}@{host}:{rendered_path}"
|
156
|
+
return rendered_path
|
@@ -1,10 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zrb
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.27.1
|
4
4
|
Summary: A Framework to Enhance Your Workflow
|
5
5
|
Home-page: https://github.com/state-alchemists/zrb
|
6
6
|
License: AGPL-3.0-or-later
|
7
|
-
Keywords: Automation,Task Runner,Code Generator,Low Code
|
7
|
+
Keywords: Automation,Task Runner,Code Generator,Monorepo,Low Code
|
8
8
|
Author: Go Frendi Gunawan
|
9
9
|
Author-email: gofrendiasgard@gmail.com
|
10
10
|
Requires-Python: >=3.10.0,<4.0.0
|
@@ -1,4 +1,4 @@
|
|
1
|
-
zrb/__init__.py,sha256=
|
1
|
+
zrb/__init__.py,sha256=dQs1S6z3XbG1BeQ62YYxc6cUs5ejw9T9ajkPgNVEs34,2875
|
2
2
|
zrb/__main__.py,sha256=-_k0XOahDF-06n41Uly-oUMkZ8XDSxO-WUUImWz6GiA,171
|
3
3
|
zrb/action/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
zrb/action/runner.py,sha256=aB46inPOs7CDckfIsS_mlgQ92_bfKltcnb77PjW6Tfw,5179
|
@@ -1388,12 +1388,9 @@ zrb/shell-scripts/ensure-podman-is-installed.sh,sha256=RvLLQIBN5cfLEsFkTpomgl_Px
|
|
1388
1388
|
zrb/shell-scripts/ensure-rsync-is-installed.sh,sha256=ffr8avoCUSoDQkEBWmeelgn-EtF9reQTaM0wfW6B0hc,1146
|
1389
1389
|
zrb/shell-scripts/ensure-ssh-is-installed.sh,sha256=w5pCzsbEa3bnxT07q6gX0nWn-7HXsMiwBRrg7dMD57w,2414
|
1390
1390
|
zrb/shell-scripts/notify.ps1,sha256=6_xPoIwuxARpYljcjVV-iRJS3gJqGfx-B6kj719cJ9o,843
|
1391
|
-
zrb/shell-scripts/rsync-util.sh,sha256=QzdhSBvUNMxB4U2B4m0Dxg9czGckRjB7Vk4A1ObG0-k,353
|
1392
|
-
zrb/shell-scripts/ssh-util.sh,sha256=9lXDzw6oO8HuA4vdbfps_uQMMwKyNYX9fZkZgpK52g8,401
|
1393
1391
|
zrb/task/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1394
1392
|
zrb/task/any_task.py,sha256=SlAp6LY-8TGopaQm3eZD3ZEx3wxvCff8UfcnYyu-aiY,39344
|
1395
1393
|
zrb/task/any_task_event_handler.py,sha256=ay4v7eXatF4sCiXpUYaHVJZljpnKlvBbFIwvZqXW8Mo,541
|
1396
|
-
zrb/task/base_remote_cmd_task.py,sha256=EhAT7grnIxFeMfwm8FV6GF6n0kOYESAyIIVzqgZBRBg,12324
|
1397
1394
|
zrb/task/base_task/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1398
1395
|
zrb/task/base_task/base_task.py,sha256=oihVRUHAvNMwlfLEWQoixt5OwyMLyW9w6bSGD9WGVIk,20457
|
1399
1396
|
zrb/task/base_task/component/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -1406,7 +1403,7 @@ zrb/task/checker.py,sha256=mh_2ajZqpNdJQ8AFVQ6ZArYtBUOXST3aZSisINuEivk,3400
|
|
1406
1403
|
zrb/task/cmd_task.py,sha256=B3kRtpb0QVjusPWAMLjpfGxvAdEfgD9_N0jiU55S3rA,14718
|
1407
1404
|
zrb/task/decorator.py,sha256=SuajollezbwiSOs29bv8A6PmFcFs_RH4pr4TPcQPDHM,3081
|
1408
1405
|
zrb/task/docker_compose_start_task.py,sha256=n4mLejebyy8sF4rbcfWZucPcBiqPSkDAdGZvOhk4Xt8,5335
|
1409
|
-
zrb/task/docker_compose_task.py,sha256=
|
1406
|
+
zrb/task/docker_compose_task.py,sha256=NuNevzooQVn3wgMNrBBdVD2FepRpE38ouYkRNXeqQ2s,15543
|
1410
1407
|
zrb/task/flow_task.py,sha256=wkvvUCrt6n1ul-o3STCPMdrlBuGBrNCRgtRzGyXir9o,5079
|
1411
1408
|
zrb/task/http_checker.py,sha256=gXqBlEStMnIhzmQ7FX9Zo-nG3-wsiVEML8IOJiSG5JI,5705
|
1412
1409
|
zrb/task/looper.py,sha256=zInLRgcQlReGXz4Ffxc2W99RovSChj6kHuGEGmaPb-Q,1432
|
@@ -1416,9 +1413,9 @@ zrb/task/path_checker.py,sha256=xkOpxlLUaEXlsiWh1o-ghqQNWYadXvTl3QV4yeIC2Rc,4677
|
|
1416
1413
|
zrb/task/path_watcher.py,sha256=aKWhT7Kuc_UJMr8SSY7ZZym-_rV526tEeIaKRRz3XYU,7419
|
1417
1414
|
zrb/task/port_checker.py,sha256=SG2yrAxdJgxdR6xymviB48K529o3Rnq_WhDJZDKgAQg,4605
|
1418
1415
|
zrb/task/recurring_task.py,sha256=wtZhi0DCDdVM7ecIgoXghQPTOQemrEvCY8xDJoaG1mo,7444
|
1419
|
-
zrb/task/remote_cmd_task.py,sha256
|
1416
|
+
zrb/task/remote_cmd_task.py,sha256=-kNkRVSIDrNJcVRBfMpc-fXYOHh6Fs2PTsiOzWwimTM,5793
|
1420
1417
|
zrb/task/resource_maker.py,sha256=e6nmFJsVHHo8_sW5F-lBfkO_2RszrlXNoubh4rwM6UY,7644
|
1421
|
-
zrb/task/rsync_task.py,sha256=
|
1418
|
+
zrb/task/rsync_task.py,sha256=NdfKtendGyH9Kg17hEsavl1NoeIJ04FTii2OaXg_S6g,6022
|
1422
1419
|
zrb/task/server.py,sha256=zC8swQOu_3YkRtGFXuRGZqz6yEu--ZhNRgNwbR44uUA,6741
|
1423
1420
|
zrb/task/task.py,sha256=iHDyUMUh1uVGlMCQdVewdT3epCOHKNRKblC3G1WSKS0,2493
|
1424
1421
|
zrb/task/time_watcher.py,sha256=v01whCMTvul_vraVccy8A9rDBk-CL7HFvPOu8g1BC5s,5130
|
@@ -1441,8 +1438,8 @@ zrb/task_input/multiline_input.py,sha256=KNto5k5X1C6KE_A-vX0OjpQyjgCRJ6BR2PwHXNQ
|
|
1441
1438
|
zrb/task_input/password_input.py,sha256=95NlJ9xIq7z_evpAyR2XsBpeuWpBXd2Ezn3P7oDOttk,4360
|
1442
1439
|
zrb/task_input/str_input.py,sha256=0nje7vI9fs_xqQBbmKB8Yn7wevlWp9Qebv7f8-GmiXs,4350
|
1443
1440
|
zrb/task_input/task_input.py,sha256=WTj_qIQyRs-04-VotjNTcVyIuf6b2afInVoCQHoRmr0,2327
|
1444
|
-
zrb-0.
|
1445
|
-
zrb-0.
|
1446
|
-
zrb-0.
|
1447
|
-
zrb-0.
|
1448
|
-
zrb-0.
|
1441
|
+
zrb-0.27.1.dist-info/LICENSE,sha256=WfnGCl8G60EYOPAEkuc8C9m9pdXWDe08NsKj3TBbxsM,728
|
1442
|
+
zrb-0.27.1.dist-info/METADATA,sha256=-ckE3NSw1Xels6NSJMCI3kRdv55-x21CTF9UE6LpdiM,17094
|
1443
|
+
zrb-0.27.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
1444
|
+
zrb-0.27.1.dist-info/entry_points.txt,sha256=xTgXc1kBKYhJHEujdaSPHUcJT3-hbyP1mLgwkv-5sSk,40
|
1445
|
+
zrb-0.27.1.dist-info/RECORD,,
|
zrb/shell-scripts/rsync-util.sh
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
set -e
|
2
|
-
auth_rsync(){
|
3
|
-
if [ "$_CONFIG_SSH_KEY" != "" ]
|
4
|
-
then
|
5
|
-
rsync --mkpath -avz -e "ssh -i $_CONFIG_SSH_KEY -p $_CONFIG_PORT" $@
|
6
|
-
elif [ "$_CONFIG_PASSWORD" != "" ]
|
7
|
-
then
|
8
|
-
sshpass -p "$_CONFIG_PASSWORD" rsync --mkpath -avz -e "ssh -p $_CONFIG_PORT" $@
|
9
|
-
else
|
10
|
-
rsync --mkpath -avz -e "ssh -p $_CONFIG_PORT" $@
|
11
|
-
fi
|
12
|
-
}
|
zrb/shell-scripts/ssh-util.sh
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
set -e
|
2
|
-
auth_ssh(){
|
3
|
-
if [ "$_CONFIG_SSH_KEY" != "" ]
|
4
|
-
then
|
5
|
-
ssh -t -p "$_CONFIG_PORT" -i "$_CONFIG_SSH_KEY" "${_CONFIG_USER}@${_CONFIG_HOST}" "$1"
|
6
|
-
elif [ "$_CONFIG_PASSWORD" != "" ]
|
7
|
-
then
|
8
|
-
sshpass -p "$_CONFIG_PASSWORD" ssh -t -p "$_CONFIG_PORT" "${_CONFIG_USER}@${_CONFIG_HOST}" "$1"
|
9
|
-
else
|
10
|
-
ssh -t -p "$_CONFIG_PORT" "${_CONFIG_USER}@${_CONFIG_HOST}" "$1"
|
11
|
-
fi
|
12
|
-
}
|
zrb/task/base_remote_cmd_task.py
DELETED
@@ -1,354 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import pathlib
|
3
|
-
from collections.abc import Callable, Iterable, Mapping
|
4
|
-
from typing import Any, Optional, TypeVar, Union
|
5
|
-
|
6
|
-
from zrb.helper.accessories.color import colored
|
7
|
-
from zrb.helper.log import logger
|
8
|
-
from zrb.helper.typecheck import typechecked
|
9
|
-
from zrb.helper.typing import JinjaTemplate
|
10
|
-
from zrb.helper.util import to_snake_case
|
11
|
-
from zrb.task.any_task import AnyTask
|
12
|
-
from zrb.task.any_task_event_handler import (
|
13
|
-
OnFailed,
|
14
|
-
OnReady,
|
15
|
-
OnRetry,
|
16
|
-
OnSkipped,
|
17
|
-
OnStarted,
|
18
|
-
OnTriggered,
|
19
|
-
OnWaiting,
|
20
|
-
)
|
21
|
-
from zrb.task.base_task.base_task import BaseTask
|
22
|
-
from zrb.task.cmd_task import CmdTask, CmdVal
|
23
|
-
from zrb.task_env.env import Env
|
24
|
-
from zrb.task_env.env_file import EnvFile
|
25
|
-
from zrb.task_group.group import Group
|
26
|
-
from zrb.task_input.any_input import AnyInput
|
27
|
-
|
28
|
-
logger.debug(colored("Loading zrb.task.base_remote_cmd_task", attrs=["dark"]))
|
29
|
-
|
30
|
-
TSingleBaseRemoteCmdTask = TypeVar(
|
31
|
-
"TSingleBaseRemoteCmdTask", bound="SingleBaseRemoteCmdTask"
|
32
|
-
)
|
33
|
-
TBaseRemoteCmdTask = TypeVar("TBaseRemoteCmdTask", bound="BaseRemoteCmdTask")
|
34
|
-
|
35
|
-
|
36
|
-
@typechecked
|
37
|
-
class RemoteConfig:
|
38
|
-
def __init__(
|
39
|
-
self,
|
40
|
-
host: JinjaTemplate,
|
41
|
-
user: JinjaTemplate = "",
|
42
|
-
password: JinjaTemplate = "",
|
43
|
-
ssh_key: JinjaTemplate = "",
|
44
|
-
port: Union[int, JinjaTemplate] = 22,
|
45
|
-
name: Optional[str] = None,
|
46
|
-
config_map: Optional[Mapping[str, JinjaTemplate]] = None,
|
47
|
-
):
|
48
|
-
self.name = name if name is not None else host
|
49
|
-
self.host = host
|
50
|
-
self.user = user
|
51
|
-
self.password = password
|
52
|
-
self.ssh_key = ssh_key
|
53
|
-
self.port = port
|
54
|
-
self.config_map = {} if config_map is None else config_map
|
55
|
-
|
56
|
-
|
57
|
-
@typechecked
|
58
|
-
class SingleBaseRemoteCmdTask(CmdTask):
|
59
|
-
def __init__(
|
60
|
-
self,
|
61
|
-
name: str,
|
62
|
-
remote_config: RemoteConfig,
|
63
|
-
group: Optional[Group] = None,
|
64
|
-
inputs: Iterable[AnyInput] = [],
|
65
|
-
envs: Iterable[Env] = [],
|
66
|
-
env_files: Iterable[EnvFile] = [],
|
67
|
-
icon: Optional[str] = None,
|
68
|
-
color: Optional[str] = None,
|
69
|
-
description: str = "",
|
70
|
-
executable: Optional[str] = None,
|
71
|
-
pre_cmd: CmdVal = "",
|
72
|
-
pre_cmd_path: CmdVal = "",
|
73
|
-
cmd: CmdVal = "",
|
74
|
-
cmd_path: CmdVal = "",
|
75
|
-
post_cmd: CmdVal = "",
|
76
|
-
post_cmd_path: CmdVal = "",
|
77
|
-
cwd: Optional[Union[str, pathlib.Path]] = None,
|
78
|
-
should_render_cwd: bool = True,
|
79
|
-
upstreams: Iterable[AnyTask] = [],
|
80
|
-
fallbacks: Iterable[AnyTask] = [],
|
81
|
-
on_triggered: Optional[OnTriggered] = None,
|
82
|
-
on_waiting: Optional[OnWaiting] = None,
|
83
|
-
on_skipped: Optional[OnSkipped] = None,
|
84
|
-
on_started: Optional[OnStarted] = None,
|
85
|
-
on_ready: Optional[OnReady] = None,
|
86
|
-
on_retry: Optional[OnRetry] = None,
|
87
|
-
on_failed: Optional[OnFailed] = None,
|
88
|
-
checkers: Iterable[AnyTask] = [],
|
89
|
-
checking_interval: Union[float, int] = 0.05,
|
90
|
-
retry: int = 2,
|
91
|
-
retry_interval: Union[float, int] = 1,
|
92
|
-
max_output_line: int = 1000,
|
93
|
-
max_error_line: int = 1000,
|
94
|
-
preexec_fn: Optional[Callable[[], Any]] = os.setsid,
|
95
|
-
should_execute: Union[bool, str, Callable[..., bool]] = True,
|
96
|
-
return_upstream_result: bool = False,
|
97
|
-
should_print_cmd_result: bool = True,
|
98
|
-
should_show_cmd: bool = True,
|
99
|
-
should_show_working_directory: bool = True,
|
100
|
-
):
|
101
|
-
CmdTask.__init__(
|
102
|
-
self,
|
103
|
-
name=name,
|
104
|
-
group=group,
|
105
|
-
inputs=inputs,
|
106
|
-
envs=envs,
|
107
|
-
env_files=env_files,
|
108
|
-
icon=icon,
|
109
|
-
color=color,
|
110
|
-
description=description,
|
111
|
-
executable=executable,
|
112
|
-
cmd=cmd,
|
113
|
-
cmd_path=cmd_path,
|
114
|
-
cwd=cwd,
|
115
|
-
should_render_cwd=should_render_cwd,
|
116
|
-
upstreams=upstreams,
|
117
|
-
fallbacks=fallbacks,
|
118
|
-
on_triggered=on_triggered,
|
119
|
-
on_waiting=on_waiting,
|
120
|
-
on_skipped=on_skipped,
|
121
|
-
on_started=on_started,
|
122
|
-
on_ready=on_ready,
|
123
|
-
on_retry=on_retry,
|
124
|
-
on_failed=on_failed,
|
125
|
-
checkers=checkers,
|
126
|
-
checking_interval=checking_interval,
|
127
|
-
retry=retry,
|
128
|
-
retry_interval=retry_interval,
|
129
|
-
max_output_line=max_output_line,
|
130
|
-
max_error_line=max_error_line,
|
131
|
-
preexec_fn=preexec_fn,
|
132
|
-
should_execute=should_execute,
|
133
|
-
return_upstream_result=return_upstream_result,
|
134
|
-
should_print_cmd_result=should_print_cmd_result,
|
135
|
-
should_show_cmd=should_show_cmd,
|
136
|
-
should_show_working_directory=should_show_working_directory,
|
137
|
-
)
|
138
|
-
self._pre_cmd = pre_cmd
|
139
|
-
self._pre_cmd_path = pre_cmd_path
|
140
|
-
self._post_cmd = post_cmd
|
141
|
-
self._post_cmd_path = post_cmd_path
|
142
|
-
self._remote_config = remote_config
|
143
|
-
|
144
|
-
def copy(self) -> TSingleBaseRemoteCmdTask:
|
145
|
-
return super().copy()
|
146
|
-
|
147
|
-
def inject_envs(self):
|
148
|
-
super().inject_envs()
|
149
|
-
# add remote config properties as env
|
150
|
-
self.add_env(
|
151
|
-
Env(
|
152
|
-
name="_CONFIG_HOST",
|
153
|
-
os_name="",
|
154
|
-
default=self.render_str(self._remote_config.host),
|
155
|
-
),
|
156
|
-
Env(
|
157
|
-
name="_CONFIG_PORT",
|
158
|
-
os_name="",
|
159
|
-
default=str(self.render_int(self._remote_config.port)),
|
160
|
-
),
|
161
|
-
Env(
|
162
|
-
name="_CONFIG_SSH_KEY",
|
163
|
-
os_name="",
|
164
|
-
default=self.render_str(self._remote_config.ssh_key),
|
165
|
-
),
|
166
|
-
Env(
|
167
|
-
name="_CONFIG_USER",
|
168
|
-
os_name="",
|
169
|
-
default=self.render_str(self._remote_config.user),
|
170
|
-
),
|
171
|
-
Env(
|
172
|
-
name="_CONFIG_PASSWORD",
|
173
|
-
os_name="",
|
174
|
-
default=self.render_str(self._remote_config.password),
|
175
|
-
),
|
176
|
-
)
|
177
|
-
for key, val in self._remote_config.config_map.items():
|
178
|
-
upper_snake_key = to_snake_case(key).upper()
|
179
|
-
rendered_val = self.render_str(val)
|
180
|
-
# add remote config map as env
|
181
|
-
self.add_env(
|
182
|
-
Env(
|
183
|
-
name="_CONFIG_MAP_" + upper_snake_key,
|
184
|
-
os_name="",
|
185
|
-
default=rendered_val,
|
186
|
-
)
|
187
|
-
)
|
188
|
-
|
189
|
-
def get_cmd_script(self, *args: Any, **kwargs: Any) -> str:
|
190
|
-
cmd_str = "\n".join(
|
191
|
-
[
|
192
|
-
self._create_cmd_script(
|
193
|
-
self._pre_cmd_path, self._pre_cmd, *args, **kwargs
|
194
|
-
),
|
195
|
-
super().get_cmd_script(*args, **kwargs),
|
196
|
-
self._create_cmd_script(
|
197
|
-
self._post_cmd_path, self._post_cmd, *args, **kwargs
|
198
|
-
),
|
199
|
-
]
|
200
|
-
)
|
201
|
-
return cmd_str
|
202
|
-
|
203
|
-
|
204
|
-
@typechecked
|
205
|
-
class BaseRemoteCmdTask(BaseTask):
|
206
|
-
def __init__(
|
207
|
-
self,
|
208
|
-
name: str,
|
209
|
-
remote_configs: Iterable[RemoteConfig],
|
210
|
-
group: Optional[Group] = None,
|
211
|
-
inputs: Iterable[AnyInput] = [],
|
212
|
-
envs: Iterable[Env] = [],
|
213
|
-
env_files: Iterable[EnvFile] = [],
|
214
|
-
icon: Optional[str] = None,
|
215
|
-
color: Optional[str] = None,
|
216
|
-
description: str = "",
|
217
|
-
executable: Optional[str] = None,
|
218
|
-
pre_cmd: CmdVal = "",
|
219
|
-
pre_cmd_path: CmdVal = "",
|
220
|
-
cmd: CmdVal = "",
|
221
|
-
cmd_path: CmdVal = "",
|
222
|
-
post_cmd: CmdVal = "",
|
223
|
-
post_cmd_path: CmdVal = "",
|
224
|
-
cwd: Optional[Union[JinjaTemplate, pathlib.Path]] = None,
|
225
|
-
should_render_cwd: bool = True,
|
226
|
-
upstreams: Iterable[AnyTask] = [],
|
227
|
-
fallbacks: Iterable[AnyTask] = [],
|
228
|
-
on_triggered: Optional[OnTriggered] = None,
|
229
|
-
on_waiting: Optional[OnWaiting] = None,
|
230
|
-
on_skipped: Optional[OnSkipped] = None,
|
231
|
-
on_started: Optional[OnStarted] = None,
|
232
|
-
on_ready: Optional[OnReady] = None,
|
233
|
-
on_retry: Optional[OnRetry] = None,
|
234
|
-
on_failed: Optional[OnFailed] = None,
|
235
|
-
checkers: Iterable[AnyTask] = [],
|
236
|
-
checking_interval: Union[float, int] = 0.05,
|
237
|
-
retry: int = 2,
|
238
|
-
retry_interval: Union[float, int] = 1,
|
239
|
-
max_output_line: int = 1000,
|
240
|
-
max_error_line: int = 1000,
|
241
|
-
preexec_fn: Optional[Callable[[], Any]] = os.setsid,
|
242
|
-
should_execute: Union[bool, str, Callable[..., bool]] = True,
|
243
|
-
return_upstream_result: bool = False,
|
244
|
-
should_print_cmd_result: bool = True,
|
245
|
-
should_show_cmd: bool = True,
|
246
|
-
should_show_working_directory: bool = True,
|
247
|
-
):
|
248
|
-
self._remote_configs = list(remote_configs)
|
249
|
-
self._sub_tasks = [
|
250
|
-
SingleBaseRemoteCmdTask(
|
251
|
-
name=f"{name}-{remote_config.name}",
|
252
|
-
remote_config=remote_config,
|
253
|
-
inputs=inputs,
|
254
|
-
envs=envs,
|
255
|
-
env_files=env_files,
|
256
|
-
description=description,
|
257
|
-
executable=executable,
|
258
|
-
pre_cmd=pre_cmd,
|
259
|
-
pre_cmd_path=pre_cmd_path,
|
260
|
-
cmd=cmd,
|
261
|
-
cmd_path=cmd_path,
|
262
|
-
post_cmd=post_cmd,
|
263
|
-
post_cmd_path=post_cmd_path,
|
264
|
-
cwd=cwd,
|
265
|
-
should_render_cwd=should_render_cwd,
|
266
|
-
upstreams=upstreams,
|
267
|
-
fallbacks=fallbacks,
|
268
|
-
on_triggered=on_triggered,
|
269
|
-
on_waiting=on_waiting,
|
270
|
-
on_skipped=on_skipped,
|
271
|
-
on_started=on_started,
|
272
|
-
on_ready=on_ready,
|
273
|
-
on_retry=on_retry,
|
274
|
-
on_failed=on_failed,
|
275
|
-
checkers=checkers,
|
276
|
-
checking_interval=checking_interval,
|
277
|
-
retry=retry,
|
278
|
-
retry_interval=retry_interval,
|
279
|
-
max_output_line=max_output_line,
|
280
|
-
max_error_line=max_error_line,
|
281
|
-
preexec_fn=preexec_fn,
|
282
|
-
should_execute=should_execute,
|
283
|
-
return_upstream_result=return_upstream_result,
|
284
|
-
should_print_cmd_result=should_print_cmd_result,
|
285
|
-
should_show_cmd=should_show_cmd,
|
286
|
-
should_show_working_directory=should_show_working_directory,
|
287
|
-
)
|
288
|
-
for remote_config in self._remote_configs
|
289
|
-
]
|
290
|
-
BaseTask.__init__(
|
291
|
-
self,
|
292
|
-
name=name,
|
293
|
-
icon=icon,
|
294
|
-
color=color,
|
295
|
-
group=group,
|
296
|
-
description=description,
|
297
|
-
upstreams=self._sub_tasks,
|
298
|
-
retry=0,
|
299
|
-
return_upstream_result=True,
|
300
|
-
)
|
301
|
-
|
302
|
-
def insert_input(self, *inputs: AnyInput):
|
303
|
-
super().insert_input(*inputs)
|
304
|
-
for subtask in self._sub_tasks:
|
305
|
-
subtask.insert_input(*inputs)
|
306
|
-
|
307
|
-
def add_input(self, *inputs: AnyInput):
|
308
|
-
super().add_input(*inputs)
|
309
|
-
for subtask in self._sub_tasks:
|
310
|
-
subtask.add_input(*inputs)
|
311
|
-
|
312
|
-
def insert_env(self, *envs: Env):
|
313
|
-
super().insert_env(*envs)
|
314
|
-
for subtask in self._sub_tasks:
|
315
|
-
subtask.insert_env(*envs)
|
316
|
-
|
317
|
-
def add_env(self, *envs: Env):
|
318
|
-
super().add_env(*envs)
|
319
|
-
for subtask in self._sub_tasks:
|
320
|
-
subtask.add_env(*envs)
|
321
|
-
|
322
|
-
def insert_env_file(self, *env_files: EnvFile):
|
323
|
-
super().insert_env_file(*env_files)
|
324
|
-
for subtask in self._sub_tasks:
|
325
|
-
subtask.insert_env_file(*env_files)
|
326
|
-
|
327
|
-
def add_env_file(self, *env_files: Env):
|
328
|
-
super().add_env_file(*env_files)
|
329
|
-
for subtask in self._sub_tasks:
|
330
|
-
subtask.add_env_file(*env_files)
|
331
|
-
|
332
|
-
def insert_upstream(self, *upstreams: AnyTask):
|
333
|
-
for subtask in self._sub_tasks:
|
334
|
-
subtask.insert_upstream(*upstreams)
|
335
|
-
|
336
|
-
def add_upstream(self, *upstreams: AnyTask):
|
337
|
-
for subtask in self._sub_tasks:
|
338
|
-
subtask.add_upstream(*upstreams)
|
339
|
-
|
340
|
-
def insert_fallback(self, *fallbacks: AnyTask):
|
341
|
-
for subtask in self._sub_tasks:
|
342
|
-
subtask.insert_fallbacks(*fallbacks)
|
343
|
-
|
344
|
-
def add_fallback(self, *fallbacks: AnyTask):
|
345
|
-
for subtask in self._sub_tasks:
|
346
|
-
subtask.add_fallback(*fallbacks)
|
347
|
-
|
348
|
-
def insert_checker(self, *checkers: AnyTask):
|
349
|
-
for subtask in self._sub_tasks:
|
350
|
-
subtask.insert_checkers(*checkers)
|
351
|
-
|
352
|
-
def add_checker(self, *checkers: AnyTask):
|
353
|
-
for subtask in self._sub_tasks:
|
354
|
-
subtask.add_checker(*checkers)
|
File without changes
|
File without changes
|
File without changes
|