1
0
mirror of https://gitlab.com/openlp/openlp.git synced 2024-09-29 19:37:38 +00:00

attempt to fix detection

This commit is contained in:
Andreas Preikschat 2014-04-03 21:46:12 +02:00
parent 9d9a8145f6
commit 6e3b02fb05

View File

@ -49,6 +49,7 @@ from jenkins import Jenkins
JENKINS_URL = 'http://ci.openlp.org/' JENKINS_URL = 'http://ci.openlp.org/'
REPO_REGEX = r'(.*+)(~.*)'
class OpenLPJobs(object): class OpenLPJobs(object):
@ -107,8 +108,7 @@ class JenkinsTrigger(object):
""" """
job = self.jenkins_instance.job(job_name) job = self.jenkins_instance.job(job_name)
while job.info['inQueue']: while job.info['inQueue']:
# Give other processes the possibility to take over. Like Thread.yield(). time.sleep(1)
time.sleep(0)
build = job.last_build build = job.last_build
build.wait() build.wait()
result_string = build.info['result'] result_string = build.info['result']
@ -137,12 +137,9 @@ def get_repo_name():
# Determine the branch's name # Determine the branch's name
repo_name = '' repo_name = ''
for line in output_list: for line in output_list:
# Check if it is remote branch. match = re.match(REPO_REGEX, line)
if 'push branch' in line: if match:
repo_name = line.replace('push branch: bzr+ssh://bazaar.launchpad.net/', 'lp:') repo_name = 'lp:%s' % match.group(2)
break
elif 'checkout of branch' in line:
repo_name = line.replace('checkout of branch: bzr+ssh://bazaar.launchpad.net/', 'lp:')
break break
repo_name = repo_name.strip('/') repo_name = repo_name.strip('/')