Skip to content

Commit

Permalink
Better check for job completion condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavchenko committed Nov 4, 2024
1 parent 2b4c99a commit c0e5b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nb2workflow/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ def build_with_kaniko(self,
time.sleep(10)
job_status = check_job_status(f"kaniko-build-{suffix}", namespace)
if job_status is not None:
if job_status[0].type == 'Complete':
if 'Complete' in [x.type for x in job_status]:
break
if job_status[0].type == 'Failed':
if 'Failed' in [x.type for x in job_status]:
try:
buildlog = sp.check_output([
'kubectl',
Expand Down

0 comments on commit c0e5b1b

Please sign in to comment.