+
+
+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