mirror of https://github.com/docker/compose.git
commit
fa90e4e555
|
@ -1,6 +1,14 @@
|
||||||
Change log
|
Change log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
1.11.1 (2017-02-09)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fixed a bug where the 3.1 file format was not being recognized as valid
|
||||||
|
by the Compose parser
|
||||||
|
|
||||||
1.11.0 (2017-02-08)
|
1.11.0 (2017-02-08)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
|
@ -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.11.0'
|
__version__ = '1.11.1'
|
||||||
|
|
|
@ -186,11 +186,6 @@ class ConfigFile(namedtuple('_ConfigFile', 'filename config')):
|
||||||
if version == '3':
|
if version == '3':
|
||||||
version = V3_0
|
version = V3_0
|
||||||
|
|
||||||
if version not in (V2_0, V2_1, V3_0):
|
|
||||||
raise ConfigurationError(
|
|
||||||
'Version in "{}" is unsupported. {}'
|
|
||||||
.format(self.filename, VERSION_EXPLANATION))
|
|
||||||
|
|
||||||
return version
|
return version
|
||||||
|
|
||||||
def get_service(self, name):
|
def get_service(self, name):
|
||||||
|
@ -479,7 +474,7 @@ def process_config_file(config_file, environment, service_name=None):
|
||||||
'service',
|
'service',
|
||||||
environment)
|
environment)
|
||||||
|
|
||||||
if config_file.version in (V2_0, V2_1, V3_0):
|
if config_file.version in (V2_0, V2_1, V3_0, V3_1):
|
||||||
processed_config = dict(config_file.config)
|
processed_config = dict(config_file.config)
|
||||||
processed_config['services'] = services
|
processed_config['services'] = services
|
||||||
processed_config['volumes'] = interpolate_config_section(
|
processed_config['volumes'] = interpolate_config_section(
|
||||||
|
@ -495,7 +490,9 @@ def process_config_file(config_file, environment, service_name=None):
|
||||||
elif config_file.version == V1:
|
elif config_file.version == V1:
|
||||||
processed_config = services
|
processed_config = services
|
||||||
else:
|
else:
|
||||||
raise Exception("Unsupported version: {}".format(repr(config_file.version)))
|
raise ConfigurationError(
|
||||||
|
'Version in "{}" is unsupported. {}'
|
||||||
|
.format(config_file.filename, VERSION_EXPLANATION))
|
||||||
|
|
||||||
config_file = config_file._replace(config=processed_config)
|
config_file = config_file._replace(config=processed_config)
|
||||||
validate_against_config_schema(config_file)
|
validate_against_config_schema(config_file)
|
||||||
|
|
|
@ -37,6 +37,11 @@ exe = EXE(pyz,
|
||||||
'compose/config/config_schema_v3.0.json',
|
'compose/config/config_schema_v3.0.json',
|
||||||
'DATA'
|
'DATA'
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
'compose/config/config_schema_v3.1.json',
|
||||||
|
'compose/config/config_schema_v3.1.json',
|
||||||
|
'DATA'
|
||||||
|
),
|
||||||
(
|
(
|
||||||
'compose/GITSHA',
|
'compose/GITSHA',
|
||||||
'compose/GITSHA',
|
'compose/GITSHA',
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION="1.11.0"
|
VERSION="1.11.1"
|
||||||
IMAGE="docker/compose:$VERSION"
|
IMAGE="docker/compose:$VERSION"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ from compose.config.config import V1
|
||||||
from compose.config.config import V2_0
|
from compose.config.config import V2_0
|
||||||
from compose.config.config import V2_1
|
from compose.config.config import V2_1
|
||||||
from compose.config.config import V3_0
|
from compose.config.config import V3_0
|
||||||
|
from compose.config.config import V3_1
|
||||||
from compose.config.environment import Environment
|
from compose.config.environment import Environment
|
||||||
from compose.config.errors import ConfigurationError
|
from compose.config.errors import ConfigurationError
|
||||||
from compose.config.errors import VERSION_EXPLANATION
|
from compose.config.errors import VERSION_EXPLANATION
|
||||||
|
@ -168,6 +169,9 @@ class ConfigTest(unittest.TestCase):
|
||||||
cfg = config.load(build_config_details({'version': version}))
|
cfg = config.load(build_config_details({'version': version}))
|
||||||
assert cfg.version == V3_0
|
assert cfg.version == V3_0
|
||||||
|
|
||||||
|
cfg = config.load(build_config_details({'version': '3.1'}))
|
||||||
|
assert cfg.version == V3_1
|
||||||
|
|
||||||
def test_v1_file_version(self):
|
def test_v1_file_version(self):
|
||||||
cfg = config.load(build_config_details({'web': {'image': 'busybox'}}))
|
cfg = config.load(build_config_details({'web': {'image': 'busybox'}}))
|
||||||
assert cfg.version == V1
|
assert cfg.version == V1
|
||||||
|
|
Loading…
Reference in New Issue