GoogleContainerTools / GoogleContainerTools/skaffold
"no tag provided for image" error when using --build-artifacts flag
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### 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 []
```
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
Contributor guide
Assessment
This issue has not been assessed yet.