Skip to content

Commit

Permalink
fix: log when no artifacts are found for docker
Browse files Browse the repository at this point in the history
refs #3545
  • Loading branch information
caarlos0 committed Nov 14, 2022
1 parent 6df90e5 commit a928abe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/pipe/docker/docker.go
Expand Up @@ -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),
Expand All @@ -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())
})
}
Expand Down

0 comments on commit a928abe

Please sign in to comment.