mirror of
https://github.com/docker/compose.git
synced 2025-07-20 12:14:41 +02:00
Revert "only pull images that can't build"
This reverts commit c6dd7da15eb3d85a1f7634e8ded9fe42c9035669. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
f4cf7a939e
commit
e6ec77047b
@ -619,9 +619,6 @@ class Project(object):
|
|||||||
def pull(self, service_names=None, ignore_pull_failures=False, parallel_pull=False, silent=False,
|
def pull(self, service_names=None, ignore_pull_failures=False, parallel_pull=False, silent=False,
|
||||||
include_deps=False):
|
include_deps=False):
|
||||||
services = self.get_services(service_names, include_deps)
|
services = self.get_services(service_names, include_deps)
|
||||||
images_to_build = {service.image_name for service in services if service.can_be_built()}
|
|
||||||
services_to_pull = [service for service in services if service.image_name not in images_to_build]
|
|
||||||
|
|
||||||
msg = not silent and 'Pulling' or None
|
msg = not silent and 'Pulling' or None
|
||||||
|
|
||||||
if parallel_pull:
|
if parallel_pull:
|
||||||
@ -647,7 +644,7 @@ class Project(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
_, errors = parallel.parallel_execute(
|
_, errors = parallel.parallel_execute(
|
||||||
services_to_pull,
|
services,
|
||||||
pull_service,
|
pull_service,
|
||||||
operator.attrgetter('name'),
|
operator.attrgetter('name'),
|
||||||
msg,
|
msg,
|
||||||
@ -660,7 +657,7 @@ class Project(object):
|
|||||||
raise ProjectError(combined_errors)
|
raise ProjectError(combined_errors)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
for service in services_to_pull:
|
for service in services:
|
||||||
service.pull(ignore_pull_failures, silent=silent)
|
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):
|
||||||
|
@ -661,13 +661,6 @@ class CLITestCase(DockerClientTestCase):
|
|||||||
'image library/nonexisting-image:latest not found' in result.stderr or
|
'image library/nonexisting-image:latest not found' in result.stderr or
|
||||||
'pull access denied for nonexisting-image' in result.stderr)
|
'pull access denied for nonexisting-image' in result.stderr)
|
||||||
|
|
||||||
def test_pull_with_build(self):
|
|
||||||
result = self.dispatch(['-f', 'pull-with-build.yml', 'pull'])
|
|
||||||
|
|
||||||
assert 'Pulling simple' not in result.stderr
|
|
||||||
assert 'Pulling from_simple' not in result.stderr
|
|
||||||
assert 'Pulling another ...' in result.stderr
|
|
||||||
|
|
||||||
def test_pull_with_quiet(self):
|
def test_pull_with_quiet(self):
|
||||||
assert self.dispatch(['pull', '--quiet']).stderr == ''
|
assert self.dispatch(['pull', '--quiet']).stderr == ''
|
||||||
assert self.dispatch(['pull', '--quiet']).stdout == ''
|
assert self.dispatch(['pull', '--quiet']).stdout == ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user