Skip to content

Commit

Permalink
dockerfile content in build exception (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavchenko authored Sep 11, 2023
1 parent 61b0518 commit 409a31d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nb2workflow/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ def check_job_status(job_name, namespace="default"):


class ContainerBuildException(Exception):
def __init__(self, message = '', buildlog=None):
def __init__(self, message = '', dockerfile=None, buildlog=None):
super().__init__(message)
self.buildlog = buildlog
self.dockerfile = dockerfile


def build_container(git_origin,
Expand Down Expand Up @@ -270,7 +271,9 @@ def _build_with_kaniko(git_origin,
'logs',
f"job/kaniko-build-{suffix}"
])
raise ContainerBuildException('', buildlog)
raise ContainerBuildException('',
dockerfile=dockerfile_content,
buildlog=buildlog)

finally:
if cleanup:
Expand Down

0 comments on commit 409a31d

Please sign in to comment.