Add a test api to test repositories which are currenlty building.
This commit is contained in:
parent
ffc33e454c
commit
684ce83058
6 changed files with 29 additions and 7 deletions
|
@ -115,12 +115,13 @@ def babysit_builder(request):
|
|||
|
||||
# wait for the job to be complete
|
||||
status_url = start_build.headers['Location']
|
||||
repository_build.phase = 'building'
|
||||
repository_build.status_url = status_url
|
||||
repository_build.save()
|
||||
|
||||
logger.debug('Waiting for job to be complete')
|
||||
status = get_status(status_url)
|
||||
while status != 'error' and status != 'completed':
|
||||
while status != 'error' and status != 'complete':
|
||||
logger.debug('Job status is: %s' % status)
|
||||
time.sleep(5)
|
||||
status = get_status(status_url)
|
||||
|
@ -129,7 +130,7 @@ def babysit_builder(request):
|
|||
if status == 'error':
|
||||
repository_build.phase = 'error'
|
||||
else:
|
||||
repository_build.phase = 'completed'
|
||||
repository_build.phase = 'complete'
|
||||
|
||||
# clean up the DO node
|
||||
logger.debug('Cleaning up DO node.')
|
||||
|
|
Reference in a new issue