1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-24 13:43:01 +00:00
kiwi-scp/kiwi_scp/subcommands/build.py

19 lines
515 B
Python
Raw Normal View History

2020-08-18 12:37:07 +00:00
# local
2020-08-19 15:21:38 +00:00
from ..subcommand import ServiceCommand
2020-08-18 12:37:07 +00:00
class BuildCommand(ServiceCommand):
2020-08-18 12:37:07 +00:00
"""kiwi build"""
def __init__(self):
super().__init__(
'build', num_projects='?', num_services='*',
action="Building images for",
2020-08-18 12:37:07 +00:00
description="Build images for the whole instance, a project or service(s) inside a project"
)
def _run_services(self, runner, args, project, services):
2020-08-19 15:09:43 +00:00
project.compose_run(['build', '--pull', *services])
2020-08-18 12:37:07 +00:00
return True