forked from openlp/openlp
attempt to fix detection
This commit is contained in:
parent
9d9a8145f6
commit
6e3b02fb05
@ -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('/')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user