mirror of
https://github.com/docker/compose.git
synced 2025-05-30 03:10:14 +02:00
ci: build fix for new buildx
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This commit is contained in:
parent
04aa155878
commit
061b52da9a
@ -368,8 +368,8 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
|
|||||||
DockerfilePath: dockerFilePath(service.Build.Context, service.Build.Dockerfile),
|
DockerfilePath: dockerFilePath(service.Build.Context, service.Build.Dockerfile),
|
||||||
NamedContexts: toBuildContexts(service.Build.AdditionalContexts),
|
NamedContexts: toBuildContexts(service.Build.AdditionalContexts),
|
||||||
},
|
},
|
||||||
CacheFrom: convertCacheOptions(cacheFrom),
|
CacheFrom: pb.CreateCaches(cacheFrom),
|
||||||
CacheTo: convertCacheOptions(cacheTo),
|
CacheTo: pb.CreateCaches(cacheTo),
|
||||||
NoCache: service.Build.NoCache,
|
NoCache: service.Build.NoCache,
|
||||||
Pull: service.Build.Pull,
|
Pull: service.Build.Pull,
|
||||||
BuildArgs: buildArgs,
|
BuildArgs: buildArgs,
|
||||||
@ -537,18 +537,3 @@ func useDockerDefaultOrServicePlatform(project *types.Project, service types.Ser
|
|||||||
}
|
}
|
||||||
return plats, nil
|
return plats, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertCacheOptions(in []*pb.CacheOptionsEntry) []bclient.CacheOptionsEntry {
|
|
||||||
out := make([]bclient.CacheOptionsEntry, len(in))
|
|
||||||
for i := range in {
|
|
||||||
attrs := make(map[string]string, len(in[i].Attrs))
|
|
||||||
for k, v := range in[i].Attrs {
|
|
||||||
attrs[k] = v
|
|
||||||
}
|
|
||||||
out[i] = bclient.CacheOptionsEntry{
|
|
||||||
Type: in[i].Type,
|
|
||||||
Attrs: attrs,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
@ -386,7 +386,7 @@ func TestBuildPlatformsStandardErrors(t *testing.T) {
|
|||||||
res := c.RunDockerComposeCmdNoCheck(t, "--project-directory", "fixtures/build-test/platforms", "build")
|
res := c.RunDockerComposeCmdNoCheck(t, "--project-directory", "fixtures/build-test/platforms", "build")
|
||||||
res.Assert(t, icmd.Expected{
|
res.Assert(t, icmd.Expected{
|
||||||
ExitCode: 17,
|
ExitCode: 17,
|
||||||
Err: `multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")`,
|
Err: `Multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")`,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user