mirror of
https://github.com/docker/compose.git
synced 2025-07-13 00:34:29 +02:00
commit
ae26fdf916
@ -1,7 +1,7 @@
|
|||||||
Change log
|
Change log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
1.9.0 (2016-10-20)
|
1.9.0 (2016-11-16)
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
**Breaking changes**
|
**Breaking changes**
|
||||||
|
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -10,7 +10,7 @@ def checkDocs = { ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
def buildImage = { ->
|
def buildImage = { ->
|
||||||
wrappedNode(label: "linux && !zfs") {
|
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
|
||||||
stage("build image") {
|
stage("build image") {
|
||||||
deleteDir(); checkout(scm)
|
deleteDir(); checkout(scm)
|
||||||
def imageName = "dockerbuildbot/compose:${gitCommit()}"
|
def imageName = "dockerbuildbot/compose:${gitCommit()}"
|
||||||
@ -37,7 +37,7 @@ def runTests = { Map settings ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ ->
|
{ ->
|
||||||
wrappedNode(label: "linux && !zfs") {
|
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
|
||||||
stage("test python=${pythonVersions} / docker=${dockerVersions}") {
|
stage("test python=${pythonVersions} / docker=${dockerVersions}") {
|
||||||
deleteDir(); checkout(scm)
|
deleteDir(); checkout(scm)
|
||||||
def storageDriver = sh(script: 'docker info | awk -F \': \' \'$1 == "Storage Driver" { print $2; exit }\'', returnStdout: true).trim()
|
def storageDriver = sh(script: 'docker info | awk -F \': \' \'$1 == "Storage Driver" { print $2; exit }\'', returnStdout: true).trim()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '1.9.0-rc4'
|
__version__ = '1.9.0'
|
||||||
|
@ -111,16 +111,17 @@ def create_ipam_config_from_dict(ipam_dict):
|
|||||||
|
|
||||||
|
|
||||||
def check_remote_network_config(remote, local):
|
def check_remote_network_config(remote, local):
|
||||||
if local.driver and remote['Driver'] != local.driver:
|
if local.driver and remote.get('Driver') != local.driver:
|
||||||
raise ConfigurationError(
|
raise ConfigurationError(
|
||||||
'Network "{}" needs to be recreated - driver has changed'
|
'Network "{}" needs to be recreated - driver has changed'
|
||||||
.format(local.full_name)
|
.format(local.full_name)
|
||||||
)
|
)
|
||||||
local_opts = local.driver_opts or {}
|
local_opts = local.driver_opts or {}
|
||||||
for k in set.union(set(remote['Options'].keys()), set(local_opts.keys())):
|
remote_opts = remote.get('Options') or {}
|
||||||
|
for k in set.union(set(remote_opts.keys()), set(local_opts.keys())):
|
||||||
if k in OPTS_EXCEPTIONS:
|
if k in OPTS_EXCEPTIONS:
|
||||||
continue
|
continue
|
||||||
if remote['Options'].get(k) != local_opts.get(k):
|
if remote_opts.get(k) != local_opts.get(k):
|
||||||
raise ConfigurationError(
|
raise ConfigurationError(
|
||||||
'Network "{}" needs to be recreated - options have changed'
|
'Network "{}" needs to be recreated - options have changed'
|
||||||
.format(local.full_name)
|
.format(local.full_name)
|
||||||
|
@ -10,6 +10,7 @@ from operator import attrgetter
|
|||||||
import enum
|
import enum
|
||||||
import six
|
import six
|
||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
|
from docker.errors import NotFound
|
||||||
from docker.utils import LogConfig
|
from docker.utils import LogConfig
|
||||||
from docker.utils.ports import build_port_bindings
|
from docker.utils.ports import build_port_bindings
|
||||||
from docker.utils.ports import split_port
|
from docker.utils.ports import split_port
|
||||||
@ -829,12 +830,11 @@ class Service(object):
|
|||||||
repo, tag, separator = parse_repository_tag(self.options['image'])
|
repo, tag, separator = parse_repository_tag(self.options['image'])
|
||||||
tag = tag or 'latest'
|
tag = tag or 'latest'
|
||||||
log.info('Pulling %s (%s%s%s)...' % (self.name, repo, separator, tag))
|
log.info('Pulling %s (%s%s%s)...' % (self.name, repo, separator, tag))
|
||||||
output = self.client.pull(repo, tag=tag, stream=True)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
output = self.client.pull(repo, tag=tag, stream=True)
|
||||||
return progress_stream.get_digest_from_pull(
|
return progress_stream.get_digest_from_pull(
|
||||||
stream_output(output, sys.stdout))
|
stream_output(output, sys.stdout))
|
||||||
except StreamOutputError as e:
|
except (StreamOutputError, NotFound) as e:
|
||||||
if not ignore_pull_failures:
|
if not ignore_pull_failures:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION="1.9.0-rc4"
|
VERSION="1.9.0"
|
||||||
IMAGE="docker/compose:$VERSION"
|
IMAGE="docker/compose:$VERSION"
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,12 +330,13 @@ class CLITestCase(DockerClientTestCase):
|
|||||||
def test_pull_with_ignore_pull_failures(self):
|
def test_pull_with_ignore_pull_failures(self):
|
||||||
result = self.dispatch([
|
result = self.dispatch([
|
||||||
'-f', 'ignore-pull-failures.yml',
|
'-f', 'ignore-pull-failures.yml',
|
||||||
'pull', '--ignore-pull-failures'])
|
'pull', '--ignore-pull-failures']
|
||||||
|
)
|
||||||
|
|
||||||
assert 'Pulling simple (busybox:latest)...' in result.stderr
|
assert 'Pulling simple (busybox:latest)...' in result.stderr
|
||||||
assert 'Pulling another (nonexisting-image:latest)...' in result.stderr
|
assert 'Pulling another (nonexisting-image:latest)...' in result.stderr
|
||||||
assert 'Error: image library/nonexisting-image' in result.stderr
|
assert ('repository nonexisting-image not found' in result.stderr or
|
||||||
assert 'not found' in result.stderr
|
'image library/nonexisting-image:latest not found' in result.stderr)
|
||||||
|
|
||||||
def test_build_plain(self):
|
def test_build_plain(self):
|
||||||
self.base_dir = 'tests/fixtures/simple-dockerfile'
|
self.base_dir = 'tests/fixtures/simple-dockerfile'
|
||||||
|
@ -2493,6 +2493,15 @@ class EnvTest(unittest.TestCase):
|
|||||||
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'bar'},
|
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'bar'},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_environment_overrides_env_file(self):
|
||||||
|
self.assertEqual(
|
||||||
|
resolve_environment({
|
||||||
|
'environment': {'FOO': 'baz'},
|
||||||
|
'env_file': ['tests/fixtures/env/one.env'],
|
||||||
|
}),
|
||||||
|
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'baz'},
|
||||||
|
)
|
||||||
|
|
||||||
def test_resolve_environment_with_multiple_env_files(self):
|
def test_resolve_environment_with_multiple_env_files(self):
|
||||||
service_dict = {
|
service_dict = {
|
||||||
'env_file': [
|
'env_file': [
|
||||||
|
@ -37,7 +37,9 @@ class NetworkTest(unittest.TestCase):
|
|||||||
def test_check_remote_network_config_driver_mismatch(self):
|
def test_check_remote_network_config_driver_mismatch(self):
|
||||||
net = Network(None, 'compose_test', 'net1', 'overlay')
|
net = Network(None, 'compose_test', 'net1', 'overlay')
|
||||||
with pytest.raises(ConfigurationError):
|
with pytest.raises(ConfigurationError):
|
||||||
check_remote_network_config({'Driver': 'bridge', 'Options': {}}, net)
|
check_remote_network_config(
|
||||||
|
{'Driver': 'bridge', 'Options': {}}, net
|
||||||
|
)
|
||||||
|
|
||||||
def test_check_remote_network_config_options_mismatch(self):
|
def test_check_remote_network_config_options_mismatch(self):
|
||||||
net = Network(None, 'compose_test', 'net1', 'overlay')
|
net = Network(None, 'compose_test', 'net1', 'overlay')
|
||||||
@ -45,3 +47,9 @@ class NetworkTest(unittest.TestCase):
|
|||||||
check_remote_network_config({'Driver': 'overlay', 'Options': {
|
check_remote_network_config({'Driver': 'overlay', 'Options': {
|
||||||
'com.docker.network.driver.foo': 'baz'
|
'com.docker.network.driver.foo': 'baz'
|
||||||
}}, net)
|
}}, net)
|
||||||
|
|
||||||
|
def test_check_remote_network_config_null_remote(self):
|
||||||
|
net = Network(None, 'compose_test', 'net1', 'overlay')
|
||||||
|
check_remote_network_config(
|
||||||
|
{'Driver': 'overlay', 'Options': None}, net
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user