File tree Expand file tree Collapse file tree 2 files changed +24
-16
lines changed
src/docker_publisher_osparc_services Expand file tree Collapse file tree 2 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 23
23
)
24
24
25
25
26
- async def run_command (config : Path ) -> None :
26
+ async def run_command (config : Path , legacy_escape : bool ) -> None :
27
27
cfg = ConfigModel .from_cfg_path (config )
28
28
print (cfg )
29
29
@@ -87,7 +87,7 @@ async def run_command(config: Path) -> None:
87
87
)
88
88
89
89
build_commands = get_commands_build_base (
90
- repo_model .pre_docker_build_hooks
90
+ repo_model .pre_docker_build_hooks , legacy_escape
91
91
)
92
92
validate_commands_list (build_commands , env_vars )
93
93
@@ -124,9 +124,9 @@ async def run_command(config: Path) -> None:
124
124
@click .command ()
125
125
@click .version_option (version = __version__ )
126
126
@click .argument ("config" , type = Path )
127
- def main (config : Path ) :
127
+ def main (config : Path , legacy_escape : bool = False ) -> None :
128
128
"""Interface to be used in CI"""
129
- asyncio .get_event_loop ().run_until_complete (run_command (config ))
129
+ asyncio .get_event_loop ().run_until_complete (run_command (config , legacy_escape ))
130
130
131
131
132
132
if __name__ == "__main__" :
Original file line number Diff line number Diff line change 13
13
CommandList = List [str ]
14
14
15
15
16
- def get_commands_build_base (pre_docker_build_hooks : list [str ]) -> CommandList :
17
- return [
18
- "git clone ${SCCI_REPO} ${SCCI_CLONE_DIR}" ,
19
- "cd ${SCCI_CLONE_DIR}" ,
20
- DOCKER_LOGIN ,
21
- "ooil legacy-escape" ,
22
- "ooil compose" ,
23
- * pre_docker_build_hooks ,
24
- "docker compose build" ,
25
- "docker tag ${SCCI_IMAGE_NAME}:${SCCI_TAG} ${SCCI_TARGET_REGISTRY_ADDRESS}/${SCCI_TEST_IMAGE}:${SCCI_TAG}" ,
26
- "docker push ${SCCI_TARGET_REGISTRY_ADDRESS}/${SCCI_TEST_IMAGE}:${SCCI_TAG}" ,
27
- ]
16
+ def get_commands_build_base (
17
+ pre_docker_build_hooks : list [str ], legacy_escape : bool
18
+ ) -> CommandList :
19
+ return (
20
+ [
21
+ "git clone ${SCCI_REPO} ${SCCI_CLONE_DIR}" ,
22
+ "cd ${SCCI_CLONE_DIR}" ,
23
+ DOCKER_LOGIN ,
24
+ ]
25
+ + ["ooil legacy-escape" ]
26
+ if legacy_escape
27
+ else []
28
+ + [
29
+ "ooil compose" ,
30
+ * pre_docker_build_hooks ,
31
+ "docker compose build" ,
32
+ "docker tag ${SCCI_IMAGE_NAME}:${SCCI_TAG} ${SCCI_TARGET_REGISTRY_ADDRESS}/${SCCI_TEST_IMAGE}:${SCCI_TAG}" ,
33
+ "docker push ${SCCI_TARGET_REGISTRY_ADDRESS}/${SCCI_TEST_IMAGE}:${SCCI_TAG}" ,
34
+ ]
35
+ )
28
36
29
37
30
38
def get_commands_test_base () -> CommandList :
You can’t perform that action at this time.
0 commit comments