kiwi-scp/src/kiwi/subcommands/push.py

19 lines
499 B
Python
Raw Normal View History

2020-08-18 13:12:08 +00:00
# local
from ._subcommand import ServiceCommand
2020-08-18 13:12:08 +00:00
class PushCommand(ServiceCommand):
2020-08-18 13:12:08 +00:00
"""kiwi push"""
def __init__(self):
super().__init__(
'push', num_projects='?', num_services='*',
action="Pushing images for",
2020-08-18 13:12:08 +00:00
description="Push 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(['push', *services])
2020-08-18 13:12:08 +00:00
return True