1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

fix: do not print ctx in docker pipe when on debug

This commit is contained in:
Carlos Alexandro Becker 2018-02-13 14:07:18 -02:00 committed by Carlos Alexandro Becker
parent 53bf5bb9d9
commit 8cf855f447

View File

@ -220,7 +220,7 @@ func dockerBuild(ctx *context.Context, root, dockerfile, image string) error {
log.WithField("image", image).Info("building docker image")
/* #nosec */
var cmd = exec.CommandContext(ctx, "docker", "build", "-f", dockerfile, "-t", image, root)
log.WithField("cmd", cmd).Debug("executing")
log.WithField("cmd", cmd.Args).Debug("executing docker")
out, err := cmd.CombinedOutput()
if err != nil {
return errors.Wrapf(err, "failed to build docker image: \n%s", string(out))
@ -233,7 +233,7 @@ func dockerTag(ctx *context.Context, image, tag string) error {
log.WithField("image", image).WithField("tag", tag).Info("tagging docker image")
/* #nosec */
var cmd = exec.CommandContext(ctx, "docker", "tag", image, tag)
log.WithField("cmd", cmd).Debug("executing")
log.WithField("cmd", cmd.Args).Debug("executing docker")
out, err := cmd.CombinedOutput()
if err != nil {
return errors.Wrapf(err, "failed to tag docker image: \n%s", string(out))
@ -246,7 +246,7 @@ func dockerPush(ctx *context.Context, docker config.Docker, image string) error
log.WithField("image", image).Info("pushing docker image")
/* #nosec */
var cmd = exec.CommandContext(ctx, "docker", "push", image)
log.WithField("cmd", cmd).Debug("executing")
log.WithField("cmd", cmd.Args).Debug("executing docker")
out, err := cmd.CombinedOutput()
if err != nil {
return errors.Wrapf(err, "failed to push docker image: \n%s", string(out))