diff options
author | 2016-09-23 08:22:06 +0200 | |
---|---|---|
committer | 2016-09-23 08:22:06 +0200 | |
commit | 6d1919171788cbc1bd003671ea2d31ccffbcb45d (patch) | |
tree | e1bd25ebdd8687c2db340b6ca36bea8693c149f3 /utils/test/reporting/functest/reportingUtils.py | |
parent | 9f7616b1e09a5d1aa2828f91c2b6f0e534e7a85f (diff) |
Add hyperlink on scenarios
JIRA: FUNCTEST-482
Change-Id: Ibe19f153dc79ae1a9b78ec9eb52bb48898d63d7e
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/reporting/functest/reportingUtils.py')
-rw-r--r-- | utils/test/reporting/functest/reportingUtils.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/utils/test/reporting/functest/reportingUtils.py b/utils/test/reporting/functest/reportingUtils.py index f02620430..9ba02e821 100644 --- a/utils/test/reporting/functest/reportingUtils.py +++ b/utils/test/reporting/functest/reportingUtils.py @@ -139,7 +139,7 @@ def getResult(testCase, installer, scenario, version): # print "Nb test OK (last 10 days):"+ str(nbTestOk) # check that we have at least 4 runs if len(scenario_results) < 1: - # No results available + # No results available test_result_indicator = -1 elif nbTestOk < 1: test_result_indicator = 0 @@ -158,3 +158,21 @@ def getResult(testCase, installer, scenario, version): else: test_result_indicator = 2 return test_result_indicator + + +def getJenkinsUrl(build_tag): + # e.g. jenkins-functest-apex-apex-daily-colorado-daily-colorado-246 + # id = 246 + # note it is linked to jenkins format + # if this format changes...function to be adapted.... + url_base = "https://build.opnfv.org/ci/view/functest/job/" + jenkins_url = "" + try: + build_id = [int(s) for s in build_tag.split("-") if s.isdigit()] + jenkins_path = filter(lambda c: not c.isdigit(), build_tag) + url_id = jenkins_path[8:-1] + "/" + str(build_id[0]) + jenkins_url = url_base + url_id + "/console" + except: + print 'Impossible to get jenkins url:' + + return jenkins_url |