Skip to content

Commit

Permalink
print pipeline run info when pipeline run doesn't finish successfully
Browse files Browse the repository at this point in the history
* CLOUDBLD-8220

Signed-off-by: Robert Cerven <rcerven@redhat.com>
  • Loading branch information
rcerven committed Dec 10, 2021
1 parent fd136fd commit 904a39b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions koji_containerbuild/plugins/builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def sigint_handler(*args, **kwargs):
os._exit(1)
os._exit(0)

build_info = self.osbs().get_build(build_id)
# User warnings are being processed in a child process,
# so we have to collect them back when the process ends
user_warnings = self._read_user_warnings(osbs_logs_dir)
Expand All @@ -526,8 +527,7 @@ def sigint_handler(*args, **kwargs):
self.upload_build_annotations(annotations)

self.logger.debug("OSBS build finished with status: %s. Build "
"response: %s.", self.osbs().get_build_reason(build_id),
self.osbs().get_build(build_id))
"response: %s.", self.osbs().get_build_reason(build_id), build_info)

self.logger.info("Response status: %r", has_succeeded)

Expand All @@ -546,11 +546,11 @@ def sigint_handler(*args, **kwargs):
build_id, repr(ex))

if error_message:
raise ContainerError('Image build failed. %s. OSBS build id: %s' %
(error_message, build_id))
raise ContainerError('Image build failed.\n%s\nOSBS build id: %s\nbuild info:\n%s' %
(error_message, build_id, build_info))
else:
raise ContainerError('Image build failed. OSBS build id: %s' %
build_id)
raise ContainerError('Image build failed.\nOSBS build id: %s\nbuild info:\n%s' %
build_id, build_info)

repositories = []
if has_succeeded:
Expand Down

0 comments on commit 904a39b

Please sign in to comment.