{"record":{"id":"3135718d99191934","repo":"GoogleContainerTools/skaffold","slug":"no-tag-provided-for-image-s","errorCode":null,"errorMessage":"no tag provided for image [%s]","messagePattern":"no tag provided for image \\[(.+?)\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/util.go","lineNumber":102,"sourceCode":"\t\t\t\tartifact.Tag = artifact.ImageName + \":\" + opts.CustomTag\n\t\t\t} else {\n\t\t\t\tnewTag, err := tag.SetImageTag(artifact.Tag, opts.CustomTag)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tartifact.Tag = newTag\n\t\t\t}\n\t\t\tresult = append(result, artifact)\n\t\t}\n\t\treturn result, nil\n\t}\n\treturn artifacts, nil\n}\n\nfunc validateArtifactTags(artifacts []graph.Artifact) error {\n\tfor _, artifact := range artifacts {\n\t\tif artifact.Tag == \"\" {\n\t\t\treturn fmt.Errorf(\"no tag provided for image [%s]\", artifact.ImageName)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":84,"sourceCodeEnd":107,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/util.go#L84-L107","documentation":"validateArtifactTags iterates over merged build artifacts and fails if any artifact has an empty Tag. Tags are produced by the tag strategy (envTemplate, dateTime, gitCommit, sha256, etc.); an empty tag means the builder could not derive an image tag, so the merged build output would be unusable downstream (deploy expects fully tagged images).","triggerScenarios":"Calling mergeBuildArtifacts with build results whose `Tag` field is empty — typically when a custom builder/cache path returns artifacts without tags, or when merging artifacts loaded from a file (`--build-artifacts` / `--file-output`) that was hand-edited or produced by an older skaffold version.","commonSituations":"Piping `skaffold build --file-output` results into `skaffold deploy` after manual editing; custom build scripts emitting JSON without the `tag` field; tag template rendering to an empty string (e.g. missing env var in envTemplate tagger).","solutions":["Regenerate the build output with `skaffold build --file-output artifacts.json` instead of hand-editing it.","Check your tagger config in skaffold.yaml; ensure envTemplate references defined env vars so the tag is non-empty.","Inspect the artifacts JSON and ensure every entry has a non-empty `tag` field."],"exampleFix":"// before (hand-edited artifacts.json)\n[{\"imageName\":\"gcr.io/proj/app\",\"tag\":\"\"}]\n// after\n[{\"imageName\":\"gcr.io/proj/app\",\"tag\":\"gcr.io/proj/app:abc123\"}]","handlingStrategy":"validation","validationCode":"for _, a := range artifacts {\n    if a.Tag == \"\" {\n        return fmt.Errorf(\"artifact %q has empty tag; rerun skaffold build\", a.ImageName)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := deployCmd.Run(); err != nil {\n    if strings.Contains(err.Error(), \"no tag provided for image\") {\n        // regenerate build output via `skaffold build --file-output`\n    }\n}","preventionTips":["Never hand-edit build output files; regenerate them with skaffold build.","Ensure tagger config (envTemplate vars) resolves to non-empty values.","Validate the build-artifacts JSON schema before passing it to deploy."],"tags":["build","image-tag","validation","skaffold"],"backgroundTag":"missing-required-argument","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}