From 98b70f460e3a573df9dbb0238c2a56a6189d889c Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Fri, 29 Dec 2017 15:07:15 -0200 Subject: [PATCH] docker: added missing params to artifact closes #486 --- pipeline/docker/docker.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pipeline/docker/docker.go b/pipeline/docker/docker.go index 6a6dfea56..737e0a0c5 100644 --- a/pipeline/docker/docker.go +++ b/pipeline/docker/docker.go @@ -181,7 +181,7 @@ func publish(ctx *context.Context, docker config.Docker, image, latest string) e log.Warn("skipping push because --skip-publish is set") return nil } - if err := dockerPush(ctx, image); err != nil { + if err := dockerPush(ctx, docker, image); err != nil { return err } if !docker.Latest { @@ -190,7 +190,7 @@ func publish(ctx *context.Context, docker config.Docker, image, latest string) e if err := dockerTag(image, latest); err != nil { return err } - return dockerPush(ctx, latest) + return dockerPush(ctx, docker, latest) } func dockerBuild(root, dockerfile, image string) error { @@ -219,7 +219,7 @@ func dockerTag(image, tag string) error { return nil } -func dockerPush(ctx *context.Context, image string) error { +func dockerPush(ctx *context.Context, docker config.Docker, image string) error { log.WithField("image", image).Info("pushing docker image") /* #nosec */ var cmd = exec.Command("docker", "push", image) @@ -230,9 +230,12 @@ func dockerPush(ctx *context.Context, image string) error { } log.Debugf("docker push output: \n%s", string(out)) ctx.Artifacts.Add(artifact.Artifact{ - Type: artifact.DockerImage, - Name: image, - // TODO: are the rest of the params relevant here? + Type: artifact.DockerImage, + Name: image, + Path: image, + Goarch: docker.Goarch, + Goos: docker.Goos, + Goarm: docker.Goarm, }) return nil }