Fixes (#856)
* fix: avoid triggering %!/(MISSING) for docker output * fix: suppress --platform for empty platform Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
parent
aad724c87a
commit
7c73531008
2 changed files with 6 additions and 2 deletions
|
@ -29,7 +29,11 @@ type NewDockerBuildExecutorInput struct {
|
||||||
func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
|
func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
|
||||||
return func(ctx context.Context) error {
|
return func(ctx context.Context) error {
|
||||||
logger := common.Logger(ctx)
|
logger := common.Logger(ctx)
|
||||||
|
if input.Platform != "" {
|
||||||
logger.Infof("%sdocker build -t %s --platform %s %s", logPrefix, input.ImageTag, input.Platform, input.ContextDir)
|
logger.Infof("%sdocker build -t %s --platform %s %s", logPrefix, input.ImageTag, input.Platform, input.ContextDir)
|
||||||
|
} else {
|
||||||
|
logger.Infof("%sdocker build -t %s %s", logPrefix, input.ImageTag, input.ContextDir)
|
||||||
|
}
|
||||||
if common.Dryrun(ctx) {
|
if common.Dryrun(ctx) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ func logDockerResponse(logger logrus.FieldLogger, dockerResponse io.ReadCloser,
|
||||||
writeLog(logger, isError, "%s :: %s\n", msg.Status, msg.ID)
|
writeLog(logger, isError, "%s :: %s\n", msg.Status, msg.ID)
|
||||||
}
|
}
|
||||||
} else if msg.Stream != "" {
|
} else if msg.Stream != "" {
|
||||||
writeLog(logger, isError, msg.Stream)
|
writeLog(logger, isError, "%s", msg.Stream)
|
||||||
} else {
|
} else {
|
||||||
writeLog(logger, false, "Unable to handle line: %s", string(line))
|
writeLog(logger, false, "Unable to handle line: %s", string(line))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue