summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
diff options
context:
space:
mode:
Diffstat (limited to 'dovetail/container.py')
-rw-r--r--dovetail/container.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/dovetail/container.py b/dovetail/container.py
index 4f6975fc..c90ff387 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -45,7 +45,6 @@ class Container(object):
sshkey = "-v /root/.ssh/id_rsa:/root/.ssh/id_rsa "
dovetail_config = dt_cfg.dovetail_config
docker_image = cls.get_docker_image(type)
- envs = dovetail_config[type]['envs']
opts = dovetail_config[type]['opts']
# credentials file openrc.sh is neccessary
@@ -57,6 +56,27 @@ class Container(object):
cls.logger.error("File %s is not exist", dovetail_config['openrc'])
return None
+ # This is used for showing the debug logs of the upstream projects
+ envs = ' -e CI_DEBUG=true'
+
+ # These are all just used by Functest's function push_results_to_db
+ if type.lower() == "functest":
+ ins_type = " -e INSTALLER_TYPE=vendor-specific"
+ scenario = " -e DEPLOY_SCENARIO=default"
+ node = " -e NODE_NAME=default"
+ tag = " -e BUILD_TAG=daily-master-001"
+
+ envs = "%s %s %s %s %s" % (envs, ins_type, scenario, node, tag)
+
+ if type.lower() == "yardstick":
+ ext_net = dt_utils.get_ext_net_name(dovetail_config['openrc'],
+ cls.logger)
+ if ext_net:
+ envs = "%s%s%s" % (envs, " -e EXTERNAL_NETWORK=", ext_net)
+ else:
+ cls.logger.error("Can't find any external network.")
+ return None
+
result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'],
dovetail_config[type]['result']['dir'])
cmd = 'sudo docker run %s %s %s %s %s %s /bin/bash' % \