From a928abe07addc4326cbad094d9d084ecec6eb555 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Mon, 14 Nov 2022 14:22:06 -0300 Subject: [PATCH] fix: log when no artifacts are found for docker refs #3545 --- internal/pipe/docker/docker.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go index 108bc8ba3a85..f5e972990959 100644 --- a/internal/pipe/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -107,7 +107,8 @@ func (Pipe) Run(ctx *context.Context) error { for _, docker := range ctx.Config.Dockers { docker := docker g.Go(func() error { - log.WithField("docker", docker).Debug("looking for artifacts matching") + log := log.WithField("id", docker.ID) + log.Debug("looking for artifacts matching") filters := []artifact.Filter{ artifact.ByGoos(docker.Goos), artifact.ByGoarch(docker.Goarch), @@ -128,6 +129,9 @@ func (Pipe) Run(ctx *context.Context) error { } artifacts := ctx.Artifacts.Filter(artifact.And(filters...)) log.WithField("artifacts", artifacts.Paths()).Debug("found artifacts") + if len(artifacts.Paths()) == 0 { + log.Warn("not binaries or packages found for the given platform - COPY/ADD may not work") + } return process(ctx, docker, artifacts.List()) }) }