skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

"no tag provided for image" error when using --build-artifacts flag

Open jumbosushi opened this issue 1 year ago • 1 comments

Expected behavior

When I use the deploy command's --build-artifacts flag, I expect it to skip the build phase and deploy smoothly

Actual behavior

I get the following error:

You either need to:
run [skaffold deploy] with [--images TAG] for each pre-built artifact
or [skaffold run] instead, to let Skaffold build, tag and deploy artifacts.
DEBU[0001] Running command: [tput colors]                subtask=-1 task=DevLoop
DEBU[0001] Command output: [8
]                          subtask=-1 task=DevLoop
no tag provided for image [<reducted>]

This error can be suppressed when you set SKAFFOLD_TAG env var. Said differently, i think the following line is preventing --build-artifacts flag to be processed without SKAFFOLD_TAG: https://github.com/GoogleContainerTools/skaffold/blob/f386e6c552e83c3a9445fe34442aaed8dd381ab3/cmd/skaffold/app/cmd/util.go#L101

Information

  • Skaffold version: v2.11.1
  • Operating system: MacOS Ventura 13.6
  • Installed via: skaffold.dev

jumbosushi avatar May 20 '24 12:05 jumbosushi

I see similar behavior without --build-artifacts. The docs seem to imply that you can call deploy without --build-artifacts, and Skaffold will follow a sensible default procedure of rendering the manifests and then applying them. Am I misunderstanding something?

kevin-hanselman avatar Jul 30 '24 16:07 kevin-hanselman