Skip to content

Commit

Permalink
Better check for job completion condition (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavchenko authored Nov 5, 2024
1 parent 2b4c99a commit 515f203
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 515f203

Please sign in to comment.