mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-12 19:03:45 +00:00
Capture errors from docker log output
- Refactored logDockerResponse function to remove extra if-else nesting - logDockerResponse func now returns an error if error was detected from the log stream - logDockerResponse will check for msg.ErrorDetail.Message and bail if there's an error
This commit is contained in:
1 parent
1791f1fd44
commit
5330599c93
3 files changed
+35
-20
No files matched your search
@@ -51,7 +51,8 @@ func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
|
||||
|
||||
input.Logger.Debugf("Creating image from context dir '%s' with tag '%s'", input.ContextDir, input.ImageTag)
|
||||
resp, err := cli.ImageBuild(input.Ctx, buildContext, options)
|
||||
input.logDockerResponse(resp.Body, err != nil)
|
||||
|
||||
err = input.logDockerResponse(resp.Body, err != nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user