GoogleContainerTools/skaffold · error
found a '%s' artifact, which is incompatible with the 'gcb'
Error message
found a '%s' artifact, which is incompatible with the 'gcb' builder: %s To use the '%s' builder, remove the 'googleCloudBuild' stanza from the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/
What it means
Google Cloud Build (gcb) can only build kaniko, docker, jib, buildpack, and ko artifact types. Any other artifact type (e.g. custom, bazel, nixpacks) under a googleCloudBuild build stanza fails validation, with advice to remove the gcb stanza to use a builder that supports that type.
Source
Thrown at pkg/skaffold/schema/validation/validation.go:660
// validateArtifactTypes checks that the artifact types are compatible with the specified builder.
func validateArtifactTypes(cfg *parser.SkaffoldConfigEntry, bc latest.BuildConfig) []ErrorWithLocation {
cfgErrs := []ErrorWithLocation{}
switch {
case bc.LocalBuild != nil:
for i, a := range bc.Artifacts {
if misc.ArtifactType(a) == misc.Kaniko {
cfgErrs = append(cfgErrs, ErrorWithLocation{
Error: fmt.Errorf("found a '%s' artifact, which is incompatible with the 'local' builder:\n\n%s\n\nTo use the '%s' builder, add the 'cluster' stanza to the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/", misc.ArtifactType(a), misc.FormatArtifact(a), misc.ArtifactType(a)),
Location: cfg.YAMLInfos.Locate(&cfg.Build.Artifacts[i].ArtifactType),
})
}
}
case bc.GoogleCloudBuild != nil:
for i, a := range bc.Artifacts {
at := misc.ArtifactType(a)
if at != misc.Kaniko && at != misc.Docker && at != misc.Jib && at != misc.Buildpack && at != misc.Ko {
cfgErrs = append(cfgErrs, ErrorWithLocation{
Error: fmt.Errorf("found a '%s' artifact, which is incompatible with the 'gcb' builder:\n\n%s\n\nTo use the '%s' builder, remove the 'googleCloudBuild' stanza from the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/", misc.ArtifactType(a), misc.FormatArtifact(a), misc.ArtifactType(a)),
Location: cfg.YAMLInfos.Locate(&cfg.Build.Artifacts[i].ArtifactType),
})
}
}
case bc.Cluster != nil:
for i, a := range bc.Artifacts {
if misc.ArtifactType(a) != misc.Kaniko && misc.ArtifactType(a) != misc.Custom {
cfgErrs = append(cfgErrs, ErrorWithLocation{
Error: fmt.Errorf("found a '%s' artifact, which is incompatible with the 'cluster' builder:\n\n%s\n\nTo use the '%s' builder, remove the 'cluster' stanza from the 'build' section of your configuration. For information, see https://skaffold.dev/docs/pipeline-stages/builders/", misc.ArtifactType(a), misc.FormatArtifact(a), misc.ArtifactType(a)),
Location: cfg.YAMLInfos.Locate(&cfg.Build.Artifacts[i].ArtifactType),
})
}
}
}
return cfgErrs
}
// validateGCBConfig checks if GCB config is valid.View on GitHub (pinned to a1189de023)
Solutions
- Remove the `googleCloudBuild` stanza and use `local:` or `cluster:` if the artifact type needs it
- Convert the artifact to a supported type (docker/jib/buildpack/ko/kaniko)
- Move the unsupported artifact to a separate profile with a compatible builder
Example fix
# before
build:
googleCloudBuild:
projectId: my-project
artifacts:
- image: myapp
custom:
buildCommand: ./build.sh
# after
build:
local: {}
artifacts:
- image: myapp
custom:
buildCommand: ./build.sh Defensive patterns
Strategy: validation
Validate before calling
const gcbAllowed = ['kaniko','docker','jib','buildpack','ko'];
if (config.build?.googleCloudBuild && config.build.artifacts?.some(a => !gcbAllowed.some(t => a[t]))) {
throw new Error('artifact type not supported by googleCloudBuild builder');
} Type guard
function gcbCompatible(cfg) {
const ok = ['kaniko','docker','jib','buildpack','ko'];
return !cfg?.build?.googleCloudBuild || cfg.build.artifacts?.every(a => ok.some(t => a[t]));
} Try / catch
try {
await skaffold.run(config);
} catch (e) {
if (/incompatible with the 'gcb' builder/.test(e.message)) {
console.error('Use a supported artifact type or switch builder stanza');
} else throw e;
} Prevention
- Remember gcb supports only kaniko/docker/jib/buildpack/ko
- Use profiles to give custom artifacts a local builder
- Check artifact type support tables in skaffold docs when adopting gcb
When it happens
Trigger: skaffold.yaml has `build.googleCloudBuild:` and an artifact whose type is not one of kaniko/docker/jib/buildpack/ko; validated in validateArtifactTypes.
Common situations: Using a `custom:` build script while submitting builds to Cloud Build, or leftover bazel artifacts from older configs.
Related errors
- invalid value for worker pool. Must match pattern projects/{
- verify command expects non-zero number of test cases
- CONFIG_MISSING_MANIFEST_FILE_ERR
- INIT_CLOUD_RUN_LOCATION_ERROR
- missing apiVersion
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/b96c729eb9539048.
Report an issue: GitHub.