mirror of
https://github.com/docker/compose.git
synced 2026-02-12 03:29:27 +08:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a1c60f64e | ||
|
|
750e521632 | ||
|
|
4afe60f271 | ||
|
|
286cc1c3be | ||
|
|
41d229ebc4 | ||
|
|
15bb3eeb39 | ||
|
|
5d34f12f07 | ||
|
|
82873d2b93 | ||
|
|
0ab351d71e | ||
|
|
fe8326619f | ||
|
|
8d51620a78 | ||
|
|
36a5d4d401 | ||
|
|
f2a4f31a6d | ||
|
|
c1a5734cad | ||
|
|
a32696ee1c | ||
|
|
d4d1b42bea | ||
|
|
ef1a9e9423 | ||
|
|
f2d8c610f1 | ||
|
|
698e2846a8 | ||
|
|
be4b7b559d |
62
CHANGELOG.md
62
CHANGELOG.md
@@ -1,6 +1,68 @@
|
||||
Change log
|
||||
==========
|
||||
|
||||
1.25.5 (2020-02-04)
|
||||
-------------------
|
||||
|
||||
### Features
|
||||
|
||||
- Bump OpenSSL from 1.1.1d to 1.1.1f
|
||||
|
||||
- Add 3.8 compose version
|
||||
|
||||
1.25.4 (2020-01-23)
|
||||
-------------------
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- Fix CI script to enforce the minimal MacOS version to 10.11
|
||||
|
||||
- Fix docker-compose exec for keys with no value
|
||||
|
||||
1.25.3 (2020-01-23)
|
||||
-------------------
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- Fix CI script to enforce the compilation with Python3
|
||||
|
||||
- Fix binary's sha256 in the release page
|
||||
|
||||
1.25.2 (2020-01-20)
|
||||
-------------------
|
||||
|
||||
### Features
|
||||
|
||||
- Allow compatibility option with `COMPOSE_COMPATIBILITY` environment variable
|
||||
|
||||
- Bump PyInstaller from 3.5 to 3.6
|
||||
|
||||
- Bump pysocks from 1.6.7 to 1.7.1
|
||||
|
||||
- Bump websocket-client from 0.32.0 to 0.57.0
|
||||
|
||||
- Bump urllib3 from 1.24.2 to 1.25.7
|
||||
|
||||
- Bump jsonschema from 3.0.1 to 3.2.0
|
||||
|
||||
- Bump PyYAML from 4.2b1 to 5.3
|
||||
|
||||
- Bump certifi from 2017.4.17 to 2019.11.28
|
||||
|
||||
- Bump coverage from 4.5.4 to 5.0.3
|
||||
|
||||
- Bump paramiko from 2.6.0 to 2.7.1
|
||||
|
||||
- Bump cached-property from 1.3.0 to 1.5.1
|
||||
|
||||
- Bump minor Linux and MacOSX dependencies
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- Validate version format on formats 2+
|
||||
|
||||
- Assume infinite terminal width when not running in a terminal
|
||||
|
||||
1.25.1 (2020-01-06)
|
||||
-------------------
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ pipeline {
|
||||
agent {
|
||||
label 'mac-python'
|
||||
}
|
||||
environment {
|
||||
DEPLOYMENT_TARGET="10.11"
|
||||
}
|
||||
steps {
|
||||
checkout scm
|
||||
sh './script/setup/osx'
|
||||
@@ -296,6 +299,6 @@ def checksum(filepath) {
|
||||
if (isUnix()) {
|
||||
sh "openssl sha256 -r -out ${filepath}.sha256 ${filepath}"
|
||||
} else {
|
||||
powershell "(Get-FileHash -Path ${filepath} -Algorithm SHA256 | % hash) + ' *${filepath}' > ${filepath}.sha256"
|
||||
powershell "(Get-FileHash -Path ${filepath} -Algorithm SHA256 | % hash).ToLower() + ' *${filepath}' | Out-File -encoding ascii ${filepath}.sha256"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
__version__ = '1.26.0dev'
|
||||
__version__ = '1.25.5'
|
||||
|
||||
@@ -1466,7 +1466,12 @@ def call_docker(args, dockeropts, environment):
|
||||
args = [executable_path] + tls_options + args
|
||||
log.debug(" ".join(map(pipes.quote, args)))
|
||||
|
||||
return subprocess.call(args, env=environment)
|
||||
filtered_env = {}
|
||||
for k, v in environment.items():
|
||||
if v is not None:
|
||||
filtered_env[k] = environment[k]
|
||||
|
||||
return subprocess.call(args, env=filtered_env)
|
||||
|
||||
|
||||
def parse_scale_args(options):
|
||||
|
||||
@@ -990,12 +990,17 @@ def translate_deploy_keys_to_container_config(service_dict):
|
||||
|
||||
deploy_dict = service_dict['deploy']
|
||||
ignored_keys = [
|
||||
k for k in ['endpoint_mode', 'labels', 'update_config', 'rollback_config', 'placement']
|
||||
k for k in ['endpoint_mode', 'labels', 'update_config', 'rollback_config']
|
||||
if k in deploy_dict
|
||||
]
|
||||
|
||||
if 'replicas' in deploy_dict and deploy_dict.get('mode', 'replicated') == 'replicated':
|
||||
service_dict['scale'] = deploy_dict['replicas']
|
||||
scale = deploy_dict.get('replicas', 1)
|
||||
max_replicas = deploy_dict.get('placement', {}).get('max_replicas_per_node', scale)
|
||||
service_dict['scale'] = min(scale, max_replicas)
|
||||
if max_replicas < scale:
|
||||
log.warning("Scale is limited to {} ('max_replicas_per_node' field).".format(
|
||||
max_replicas))
|
||||
|
||||
if 'restart_policy' in deploy_dict:
|
||||
service_dict['restart'] = {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1040
compose/config/config_schema_v3.8.json
Normal file
1040
compose/config/config_schema_v3.8.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,10 @@ COMPOSEFILE_V3_4 = ComposeVersion('3.4')
|
||||
COMPOSEFILE_V3_5 = ComposeVersion('3.5')
|
||||
COMPOSEFILE_V3_6 = ComposeVersion('3.6')
|
||||
COMPOSEFILE_V3_7 = ComposeVersion('3.7')
|
||||
COMPOSEFILE_V3_8 = ComposeVersion('3.8')
|
||||
|
||||
# minimum DOCKER ENGINE API version needed to support
|
||||
# features for each compose schema version
|
||||
API_VERSIONS = {
|
||||
COMPOSEFILE_V1: '1.21',
|
||||
COMPOSEFILE_V2_0: '1.22',
|
||||
@@ -57,6 +60,7 @@ API_VERSIONS = {
|
||||
COMPOSEFILE_V3_5: '1.30',
|
||||
COMPOSEFILE_V3_6: '1.36',
|
||||
COMPOSEFILE_V3_7: '1.38',
|
||||
COMPOSEFILE_V3_8: '1.38',
|
||||
}
|
||||
|
||||
API_VERSION_TO_ENGINE_VERSION = {
|
||||
@@ -74,4 +78,5 @@ API_VERSION_TO_ENGINE_VERSION = {
|
||||
API_VERSIONS[COMPOSEFILE_V3_5]: '17.06.0',
|
||||
API_VERSIONS[COMPOSEFILE_V3_6]: '18.02.0',
|
||||
API_VERSIONS[COMPOSEFILE_V3_7]: '18.06.0',
|
||||
API_VERSIONS[COMPOSEFILE_V3_8]: '18.06.0',
|
||||
}
|
||||
|
||||
@@ -87,6 +87,11 @@ exe = EXE(pyz,
|
||||
'compose/config/config_schema_v3.7.json',
|
||||
'DATA'
|
||||
),
|
||||
(
|
||||
'compose/config/config_schema_v3.8.json',
|
||||
'compose/config/config_schema_v3.8.json',
|
||||
'DATA'
|
||||
),
|
||||
(
|
||||
'compose/GITSHA',
|
||||
'compose/GITSHA',
|
||||
|
||||
@@ -96,6 +96,11 @@ coll = COLLECT(exe,
|
||||
'compose/config/config_schema_v3.7.json',
|
||||
'DATA'
|
||||
),
|
||||
(
|
||||
'compose/config/config_schema_v3.8.json',
|
||||
'compose/config/config_schema_v3.8.json',
|
||||
'DATA'
|
||||
),
|
||||
(
|
||||
'compose/GITSHA',
|
||||
'compose/GITSHA',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# http://git-scm.com/download/win
|
||||
#
|
||||
# 2. Install Python 3.7.2:
|
||||
# 2. Install Python 3.7.x:
|
||||
#
|
||||
# https://www.python.org/downloads/
|
||||
#
|
||||
@@ -39,7 +39,7 @@ if (Test-Path venv) {
|
||||
Get-ChildItem -Recurse -Include *.pyc | foreach ($_) { Remove-Item $_.FullName }
|
||||
|
||||
# Create virtualenv
|
||||
virtualenv .\venv
|
||||
virtualenv -p C:\Python37\python.exe .\venv
|
||||
|
||||
# pip and pyinstaller generate lots of warnings, so we need to ignore them
|
||||
$ErrorActionPreference = "Continue"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
VERSION="1.25.1"
|
||||
VERSION="1.25.5"
|
||||
IMAGE="docker/compose:$VERSION"
|
||||
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ if ! [ ${DEPLOYMENT_TARGET} == "$(macos_version)" ]; then
|
||||
SDK_SHA1=dd228a335194e3392f1904ce49aff1b1da26ca62
|
||||
fi
|
||||
|
||||
OPENSSL_VERSION=1.1.1d
|
||||
OPENSSL_VERSION=1.1.1f
|
||||
OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
|
||||
OPENSSL_SHA1=056057782325134b76d1931c48f2c7e6595d7ef4
|
||||
OPENSSL_SHA1=238e001ea1fbf19ede43e36209c37c1a636bb51f
|
||||
|
||||
PYTHON_VERSION=3.7.5
|
||||
PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
|
||||
|
||||
@@ -1711,6 +1711,17 @@ services:
|
||||
assert stderr == ""
|
||||
assert stdout == "/\n"
|
||||
|
||||
@mock.patch.dict(os.environ)
|
||||
def test_exec_novalue_var_dotenv_file(self):
|
||||
os.environ['MYVAR'] = 'SUCCESS'
|
||||
self.base_dir = 'tests/fixtures/exec-novalue-var'
|
||||
self.dispatch(['up', '-d'])
|
||||
assert len(self.project.containers()) == 1
|
||||
|
||||
stdout, stderr = self.dispatch(['exec', '-T', 'nginx', 'env'])
|
||||
assert 'CHECK_VAR=SUCCESS' in stdout
|
||||
assert not stderr
|
||||
|
||||
def test_exec_detach_long_form(self):
|
||||
self.base_dir = 'tests/fixtures/links-composefile'
|
||||
self.dispatch(['up', '--detach', 'console'])
|
||||
|
||||
6
tests/fixtures/exec-novalue-var/docker-compose.yml
vendored
Normal file
6
tests/fixtures/exec-novalue-var/docker-compose.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: '3'
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
environment:
|
||||
- CHECK_VAR=${MYVAR}
|
||||
@@ -3637,7 +3637,6 @@ class InterpolationTest(unittest.TestCase):
|
||||
assert 'labels' in warn_message
|
||||
assert 'endpoint_mode' in warn_message
|
||||
assert 'update_config' in warn_message
|
||||
assert 'placement' in warn_message
|
||||
assert 'resources.reservations.cpus' in warn_message
|
||||
assert 'restart_policy.delay' in warn_message
|
||||
assert 'restart_policy.window' in warn_message
|
||||
|
||||
Reference in New Issue
Block a user