Combine multiarch and native/cache builders

Combine the two builders, as they are almost identical. The only
difference was whether the platforms were set.

The native cached builder wasn't using the context it created, so now
we do.

We'll set the driver to `docker-container` - it seems to be the default
but the Docker docs claim it is `docker`.
This commit is contained in:
Donal McBreen
2024-06-06 09:43:58 +01:00
parent f48987aa03
commit 2a4a8ac859
8 changed files with 76 additions and 82 deletions

View File

@@ -122,7 +122,7 @@ class CliMainTest < CliTestCase
.returns("")
SSHKit::Backend::Abstract.any_instance.expects(:capture_with_info)
.with(:docker, :buildx, :inspect, "kamal-app-multiarch", "> /dev/null")
.with(:docker, :buildx, :inspect, "kamal-local", "> /dev/null")
.returns("")
SSHKit::Backend::Abstract.any_instance.expects(:capture_with_info)
@@ -160,7 +160,7 @@ class CliMainTest < CliTestCase
.returns("")
SSHKit::Backend::Abstract.any_instance.expects(:capture_with_info)
.with(:docker, :buildx, :inspect, "kamal-app-multiarch", "> /dev/null")
.with(:docker, :buildx, :inspect, "kamal-local", "> /dev/null")
.returns("")
SSHKit::Backend::Abstract.any_instance.expects(:capture_with_info)