release tag support 33/26433/10
authorMatthewLi <matthew.lijun@huawei.com>
Thu, 22 Dec 2016 10:59:08 +0000 (05:59 -0500)
committerMatthewLi <matthew.lijun@huawei.com>
Thu, 5 Jan 2017 08:08:35 +0000 (03:08 -0500)
JIRA: DOVETAIL-170

Change-Id: Id56e30fdb3fb5b652e2145dd406b71986997f200
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
docs/dovetailtool/dovetail.tool.installation.rst
dovetail/conf/dovetail_config.yml
dovetail/report.py
setup.cfg

index 93871e7..288de0b 100644 (file)
@@ -66,6 +66,24 @@ access to complete the installation.
 
 At this point the environment is now ready for Dovetail execution.
 
+The tool ``tox`` is used, environment preparation progress is included in tox
+until completely replaced, the configuration information is set in:
+
+::
+
+  setup.py
+  setup.cfg
+  requirements.txt
+  test-requirements.txt
+
+by running:
+
+::
+
+  tox
+
+the environment prepartion is completed.
+
 Compliance and certification test cases
 ----------------------------------------
 
@@ -183,3 +201,15 @@ Results Output
 
 The running log is stored in ``/home/opnfv/dovetail/results/dovetail.log``.
 The compliance report is stored in ``/home/opnfv/dovetail/results/dovetail_report.txt``.
+
+Dovetail Version and Release
+############################
+
+Dovetail version tag is shown in ``setup.cfg``, which will also shown in the
+``dovetail report``. At the time of version release, just to set the version value in
+``setup.cfg``.
+
+# TO DO: (which should be discussed)
+1)how to pubish version, such as both the online and offline package in some website
+or somewhere.
+2)provide version download address, userguide, etc.
index c8f9fbe..42f8ca9 100644 (file)
@@ -7,8 +7,10 @@ cli_file_name: 'cmd_config.yml'
 # OPENSTACK Credential file
 creds: '/home/opnfv/dovetail/openstack.creds'
 
-# TO DO: once version scheme settled, adjust accordingly
-repo: 'https://github.com/opnfv/dovetail/tree/master/'
+repo:
+  tag: tag_name
+  path: https://github.com/opnfv/dovetail/tree/
+
 COMPLIANCE_PATH: compliance/
 TESTCASE_PATH: testcase/
 # testsuite supported, should adjust accordingly
@@ -51,4 +53,3 @@ validate_input:
   valid_docker_tag:
     - 'stable'
     - 'latest'
-
index 8c302b6..5da6ef8 100644 (file)
@@ -15,6 +15,8 @@ import os
 import datetime
 import uuid
 
+from pbr import version
+
 import utils.dovetail_logger as dt_logger
 
 from utils.dovetail_config import DovetailConfig as dt_cfg
@@ -47,8 +49,8 @@ class Report:
     @classmethod
     def generate_json(cls, testsuite_yaml, testarea, duration):
         report_obj = {}
-        # TO DO: once version scheme settled, adjust accordingly
-        report_obj['version'] = '1.0'
+        report_obj['version'] = \
+            version.VersionInfo('dovetail').version_string()
         report_obj['testsuite'] = testsuite_yaml['name']
         # TO DO: once dashboard url settled, adjust accordingly
         report_obj['dashboard'] = None
@@ -112,13 +114,15 @@ class Report:
             testcase_num[area] = 0
             testcase_passnum[area] = 0
 
-        # TO DO: once version scheme settled, adjust accordingly
-        spec_link = dt_cfg.dovetail_config['repo'] + 'dovetail/testcase'
+        repo_link = dt_cfg.dovetail_config['repo']['path'] + \
+            dt_cfg.dovetail_config['repo']['tag']
+
         for testcase in report_data['testcases_list']:
             pattern = re.compile(
                 '|'.join(dt_cfg.dovetail_config['testarea_supported']))
             area = pattern.findall(testcase['name'])[0]
             result_dir = dt_cfg.dovetail_config['result_dir']
+            spec_link = repo_link + '/dovetail/testcase'
             sub_report[area] += '- <%s> %s result: <%s>\n' %\
                 (spec_link, testcase['name'], result_dir)
             testcase_num[area] += 1
@@ -135,9 +139,7 @@ class Report:
         for key in sub_report:
             if testcase_num[key] != 0:
                 pass_rate = testcase_passnum[key] / testcase_num[key]
-                # TO DO: once version scheme settled, adjust accordingly
-                doc_link = dt_cfg.dovetail_config['repo'] +\
-                    ('docs/testsuites/%s' % key)
+                doc_link = repo_link + ('/docs/testsuites/%s' % key)
                 report_txt += '- %s results: <%s> pass %.2f%%\n' %\
                     (key, doc_link, pass_rate * 100)
         for key in sub_report:
index 46f2c4d..de8b27f 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
 [metadata]
 name = dovetail
+version = 0.1
 home-page = https://wiki.opnfv.org/display/dovetail
 
 [entry_points]