aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/functest_utils.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-03-17 14:41:06 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2017-03-17 14:41:06 +0100
commitf15a4f277fb61b86074e949e2323b8f652969dd1 (patch)
tree56b0c8ecc19287da7067e2ac1811c872f97c049e /functest/utils/functest_utils.py
parent5f82f17a633674c19b69cca877569fd845253343 (diff)
Bug Fix: retrieve version from build tag in weekly jobs
- fix regex issue - add unit test to cover weekly and dummy build tags - remove useless logs JIRA: FUNCTEST-765 Change-Id: I7a8d40b4662f4557cd080669da46fb1c32d2ad6d Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'functest/utils/functest_utils.py')
-rw-r--r--functest/utils/functest_utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index e5e755d7..9e13ffe9 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -111,12 +111,13 @@ def get_version():
# if launched through CI the build tag has the following format
# jenkins-<project>-<installer>-<pod>-<job>-<branch>-<id>
# e.g. jenkins-functest-fuel-opnfv-jump-2-daily-master-190
+ # jenkins-functest-fuel-baremetal-weekly-master-8
# use regex to match branch info
- rule = "daily-(.+?)-[0-9]*"
+ rule = "(dai|week)ly-(.+?)-[0-9]*"
build_tag = get_build_tag()
m = re.search(rule, build_tag)
if m:
- return m.group(1)
+ return m.group(2)
else:
return "unknown"
@@ -156,8 +157,6 @@ def get_db_url():
# if TEST_DB_URL declared in env variable, use it!
db_url = os.environ['TEST_DB_URL']
except KeyError:
- logger.info("DB URL not declared as env variable,"
- "use local configuration")
db_url = get_functest_config('results.test_db_url')
return db_url