Fix build status update. (#4224)

Check for valid statuses rather than only excluding the WORKING status.
There are other failure statuses that need to be accounted for (e.g.
EXPIRED).
This commit is contained in:
Oliver Chang 2020-07-30 15:10:52 +10:00 committed by GitHub
parent 1753fe12bf
commit ccb5821f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ def get_last_build(build_ids):
for build_id in reversed(build_ids):
project_build = cloudbuild.projects().builds().get(projectId=image_project,
id=build_id).execute()
if project_build['status'] == 'WORKING':
if project_build['status'] not in ('SUCCESS', 'FAILURE', 'TIMEOUT'):
continue
if not builds_status.upload_log(build_id):