From 31297f26e96b8547a0da3e80b9c93a850e04ccab Mon Sep 17 00:00:00 2001 From: jpic Date: Tue, 28 Jan 2020 12:29:04 +0100 Subject: [PATCH] Allow building a single service --- podctl/console_script.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/podctl/console_script.py b/podctl/console_script.py index b19e537..c3ab08b 100644 --- a/podctl/console_script.py +++ b/podctl/console_script.py @@ -31,9 +31,18 @@ class BuildStreamProtocol(asyncio.subprocess.SubprocessStreamProtocol): @cli2.option('debug', help='Print debug output', color=cli2.GREEN, alias='d') -async def build(service=None, **kwargs): +async def build(*services, **kwargs): procs = [] - for name, service in console_script.pod.services.items(): + if services: + services = { + k: v + for k, v in console_script.pod.services.items() + if k in services + } + else: + services = console_script.pod.services + + for name, service in services.items(): container = service.container if not container.variable('base'): continue