diff options
-rw-r--r-- | dovetail/container.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dovetail/container.py b/dovetail/container.py index 54c43adc..6ff3980d 100644 --- a/dovetail/container.py +++ b/dovetail/container.py @@ -7,6 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 # +import os import utils.dovetail_logger as dt_logger import utils.dovetail_utils as dt_utils from conf.dovetail_config import dovetail_config @@ -38,6 +39,12 @@ class Container: # sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa " docker_image = cls.get_docker_image(type) envs = dovetail_config[type]['envs'] + import re + for i in ['INSTALLER_TYPE', 'DEPLOY_SCENARIO', + 'DEPLOY_TYPE', 'CI_DEBUG']: + envs = re.sub("%s=(\w+)" % i, '%s=%s' % (i, os.getenv(i)), envs) + envs = re.sub("INSTALLER_IP=\d+\.?\d+\.?\d+\.?\d+", + 'INSTALLER_IP=' + os.getenv('INSTALLER_IP'), envs) opts = dovetail_config[type]['opts'] sshkey = '' result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'], |