mirror of
https://github.com/docker/compose.git
synced 2026-02-11 02:59:25 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d51620a78 | ||
|
|
36a5d4d401 | ||
|
|
f2a4f31a6d | ||
|
|
c1a5734cad | ||
|
|
a32696ee1c | ||
|
|
d4d1b42bea | ||
|
|
ef1a9e9423 | ||
|
|
f2d8c610f1 | ||
|
|
698e2846a8 | ||
|
|
be4b7b559d |
@@ -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.4'
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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.4"
|
||||
IMAGE="docker/compose:$VERSION"
|
||||
|
||||
|
||||
|
||||
@@ -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}
|
||||
Reference in New Issue
Block a user