summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhongbo tian <hongbo.tianhongbo@huawei.com>2017-03-30 07:42:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-30 07:42:23 +0000
commit7063707c6d95db5dc0b48f6527768d411ff5ecf6 (patch)
tree52e4b5175b9db63c7d742645737ccc932530741a
parent7142d98c73a477e077f1148117316ef12273f412 (diff)
parent0d1e35bfb9069c701dbf24c3daaa618bc3ad108b (diff)
Merge "dovetail tool: set a unique build_tag for each DoveTail test"
-rw-r--r--dovetail/container.py7
-rw-r--r--dovetail/report.py5
-rwxr-xr-xdovetail/run.py4
3 files changed, 10 insertions, 6 deletions
diff --git a/dovetail/container.py b/dovetail/container.py
index 9f4edd40..346efed1 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -62,8 +62,7 @@ class Container(object):
ins_type = " -e INSTALLER_TYPE=vendor-specific"
scenario = " -e DEPLOY_SCENARIO=default"
node = " -e NODE_NAME=master"
- tag = " -e BUILD_TAG=daily-master-001"
- envs = "%s %s %s %s" % (ins_type, scenario, node, tag)
+ envs = "%s %s %s" % (ins_type, scenario, node)
dovetail_config = dt_cfg.dovetail_config
if dovetail_config['report_dest'].startswith("http"):
@@ -107,8 +106,10 @@ class Container(object):
if not openrc:
return None
- # This is used for showing the debug logs of the upstream projects
+ # CI_DEBUG is used for showing the debug logs of the upstream projects
+ # BUILD_TAG is the unique id for this test
envs = ' -e CI_DEBUG=true'
+ envs = envs + ' -e BUILD_TAG=%s' % dovetail_config['build_tag']
config = ""
if type.lower() == "functest":
diff --git a/dovetail/report.py b/dovetail/report.py
index f2210cb7..deabbdd2 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -13,7 +13,6 @@ import urllib2
import re
import os
import datetime
-import uuid
from pbr import version
@@ -47,7 +46,7 @@ class Report(object):
report_obj['testsuite'] = testsuite_yaml['name']
# TO DO: once dashboard url settled, adjust accordingly
report_obj['dashboard'] = None
- report_obj['validation_ID'] = str(uuid.uuid4())
+ report_obj['build_tag'] = dt_cfg.dovetail_config['build_tag']
report_obj['upload_date'] =\
datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
report_obj['duration'] = duration
@@ -89,7 +88,7 @@ class Report(object):
report_txt += 'Version: %s\n' % report_data['version']
report_txt += 'TestSuite: %s\n' % report_data['testsuite']
report_txt += 'Result Dashboard: %s\n' % report_data['dashboard']
- report_txt += 'Validation ID: %s\n' % report_data['validation_ID']
+ report_txt += 'Build Tag: %s\n' % report_data['build_tag']
report_txt += 'Upload Date: %s\n' % report_data['upload_date']
if report_data['duration'] == 0:
report_txt += 'Duration: %s\n\n' % 'N/A'
diff --git a/dovetail/run.py b/dovetail/run.py
index 2a2c5677..828a2b70 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -12,6 +12,7 @@ import click
import os
import copy
import time
+import uuid
import utils.dovetail_logger as dt_logger
import utils.dovetail_utils as dt_utils
@@ -154,6 +155,8 @@ def clean_results_dir():
def main(*args, **kwargs):
"""Dovetail compliance test entry!"""
+ build_tag = "daily-master-%s" % str(uuid.uuid4())
+ dt_cfg.dovetail_config['build_tag'] = build_tag
clean_results_dir()
if kwargs['debug']:
os.environ['DEBUG'] = 'true'
@@ -162,6 +165,7 @@ def main(*args, **kwargs):
logger.info('================================================')
logger.info('Dovetail compliance: %s!', (kwargs['testsuite']))
logger.info('================================================')
+ logger.info('Build tag: %s', dt_cfg.dovetail_config['build_tag'])
validate_input(kwargs, dt_cfg.dovetail_config['validate_input'], logger)
configs = filter_config(kwargs, logger)