mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-12-24 18:22:59 +00:00
"kiwi build"
This commit is contained in:
parent
99a50f1460
commit
0c18ba2dd5
1 changed files with 18 additions and 0 deletions
18
kiwi_scp/commands/cmd_build.py
Normal file
18
kiwi_scp/commands/cmd_build.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from typing import List
|
||||
|
||||
from .cli import KiwiCommand, KiwiCommandType
|
||||
from .decorators import kiwi_command
|
||||
from ..executable import COMPOSE_EXE
|
||||
from ..instance import Instance, Project
|
||||
|
||||
|
||||
@kiwi_command(
|
||||
cmd_type=KiwiCommandType.SERVICE,
|
||||
short_help="Build docker images",
|
||||
)
|
||||
class BuildCommand(KiwiCommand):
|
||||
"""Build images for the whole instance, a project or service(s) inside a project"""
|
||||
|
||||
@classmethod
|
||||
def run_for_services(cls, instance: Instance, project: Project, service_names: List[str], **kwargs) -> None:
|
||||
COMPOSE_EXE.run(["build", "--pull", *service_names], **project.process_kwargs)
|
Loading…
Reference in a new issue