mirror of
https://github.com/docker/compose.git
synced 2025-07-14 01:04:26 +02:00
Add --quiet parameter to docker-compose pull, using existing silent flag
Signed-off-by: Joel Barciauskas <barciajo@gmail.com>
This commit is contained in:
parent
86a0e36348
commit
59c4c2388e
@ -634,11 +634,13 @@ class TopLevelCommand(object):
|
|||||||
Options:
|
Options:
|
||||||
--ignore-pull-failures Pull what it can and ignores images with pull failures.
|
--ignore-pull-failures Pull what it can and ignores images with pull failures.
|
||||||
--parallel Pull multiple images in parallel.
|
--parallel Pull multiple images in parallel.
|
||||||
|
--quiet Pull without printing progress information
|
||||||
"""
|
"""
|
||||||
self.project.pull(
|
self.project.pull(
|
||||||
service_names=options['SERVICE'],
|
service_names=options['SERVICE'],
|
||||||
ignore_pull_failures=options.get('--ignore-pull-failures'),
|
ignore_pull_failures=options.get('--ignore-pull-failures'),
|
||||||
parallel_pull=options.get('--parallel')
|
parallel_pull=options.get('--parallel'),
|
||||||
|
silent=options.get('--quiet'),
|
||||||
)
|
)
|
||||||
|
|
||||||
def push(self, options):
|
def push(self, options):
|
||||||
|
@ -462,12 +462,12 @@ class Project(object):
|
|||||||
|
|
||||||
return plans
|
return plans
|
||||||
|
|
||||||
def pull(self, service_names=None, ignore_pull_failures=False, parallel_pull=False):
|
def pull(self, service_names=None, ignore_pull_failures=False, parallel_pull=False, silent=False):
|
||||||
services = self.get_services(service_names, include_deps=False)
|
services = self.get_services(service_names, include_deps=False)
|
||||||
|
|
||||||
if parallel_pull:
|
if parallel_pull:
|
||||||
def pull_service(service):
|
def pull_service(service):
|
||||||
service.pull(ignore_pull_failures, True)
|
service.pull(ignore_pull_failures, True, silent=silent)
|
||||||
|
|
||||||
parallel.parallel_execute(
|
parallel.parallel_execute(
|
||||||
services,
|
services,
|
||||||
@ -477,7 +477,7 @@ class Project(object):
|
|||||||
limit=5)
|
limit=5)
|
||||||
else:
|
else:
|
||||||
for service in services:
|
for service in services:
|
||||||
service.pull(ignore_pull_failures)
|
service.pull(ignore_pull_failures, silent=silent)
|
||||||
|
|
||||||
def push(self, service_names=None, ignore_push_failures=False):
|
def push(self, service_names=None, ignore_push_failures=False):
|
||||||
for service in self.get_services(service_names, include_deps=False):
|
for service in self.get_services(service_names, include_deps=False):
|
||||||
|
@ -431,6 +431,10 @@ class CLITestCase(DockerClientTestCase):
|
|||||||
assert ('repository nonexisting-image not found' in result.stderr or
|
assert ('repository nonexisting-image not found' in result.stderr or
|
||||||
'image library/nonexisting-image:latest not found' in result.stderr)
|
'image library/nonexisting-image:latest not found' in result.stderr)
|
||||||
|
|
||||||
|
def test_pull_with_quiet(self):
|
||||||
|
assert self.dispatch(['pull', '--quiet']).stderr == ''
|
||||||
|
assert self.dispatch(['pull', '--quiet']).stdout == ''
|
||||||
|
|
||||||
def test_build_plain(self):
|
def test_build_plain(self):
|
||||||
self.base_dir = 'tests/fixtures/simple-dockerfile'
|
self.base_dir = 'tests/fixtures/simple-dockerfile'
|
||||||
self.dispatch(['build', 'simple'])
|
self.dispatch(['build', 'simple'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user