Skip to content

Commit

Permalink
fix: non-crossplatform should not use cli (#9178)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericzzzzzzz committed Nov 21, 2023
1 parent 1f591ba commit 1fd9627
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ integration-in-docker: skaffold-builder-ci
-e INTEGRATION_TEST_ARGS=$(INTEGRATION_TEST_ARGS) \
-e IT_PARTITION=$(IT_PARTITION) \
gcr.io/$(GCP_PROJECT)/skaffold-builder \
make integration
make integration-tests

.PHONY: submit-build-trigger
submit-build-trigger:
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/build/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (b *Builder) Build(ctx context.Context, out io.Writer, a *latest.Artifact,
// ignore useCLI boolean if buildkit is enabled since buildkit is only implemented for docker CLI at the moment in skaffold.
// we might consider a different approach in the future.
// use CLI for cross-platform builds
if b.useCLI || (b.useBuildKit != nil && *b.useBuildKit) || len(a.DockerArtifact.CliFlags) > 0 || matcher.IsNotEmpty() {
if b.useCLI || (b.useBuildKit != nil && *b.useBuildKit) || len(a.DockerArtifact.CliFlags) > 0 || matcher.IsCrossPlatform() {
imageID, err = b.dockerCLIBuild(ctx, output.GetUnderlyingWriter(out), a.ImageName, a.Workspace, dockerfile, a.ArtifactType.DockerArtifact, opts, pl)
} else {
imageID, err = b.localDocker.Build(ctx, out, a.Workspace, a.ImageName, a.ArtifactType.DockerArtifact, opts)
Expand Down

0 comments on commit 1fd9627

Please sign in to comment.