pack arch no longer needed, update builder name in tests

This commit is contained in:
Nick Hammond
2024-09-05 22:17:28 -07:00
parent 24f4308372
commit ae68193f99
2 changed files with 2 additions and 6 deletions

View File

@@ -85,10 +85,6 @@ class Kamal::Configuration::Builder
builder_config.fetch("driver", "docker-container") builder_config.fetch("driver", "docker-container")
end end
def pack_arch
builder_config["pack"]["arch"] if pack?
end
def pack_builder def pack_builder
builder_config["pack"]["builder"] if pack? builder_config["pack"]["builder"] if pack?
end end

View File

@@ -62,8 +62,8 @@ class CommandsBuilderTest < ActiveSupport::TestCase
end end
test "target pack when pack is set" do test "target pack when pack is set" do
builder = new_builder_command(image: "dhh/app", builder: { "pack" => { "arch" => "amd64", "builder" => "heroku/builder:24", "buildpacks" => [ "heroku/ruby", "heroku/procfile" ] } }) builder = new_builder_command(image: "dhh/app", builder: { "arch" => "amd64", "pack" => { "builder" => "heroku/builder:24", "buildpacks" => [ "heroku/ruby", "heroku/procfile" ] } })
assert_equal "native/pack", builder.name assert_equal "pack", builder.name
assert_equal \ assert_equal \
"pack build dhh/app --platform linux/amd64 --builder heroku/builder:24 --buildpack heroku/ruby --buildpack heroku/procfile --buildpack paketo-buildpacks/image-labels -t dhh/app:123 -t dhh/app:latest --env BP_IMAGE_LABELS=service=app --path . && docker push dhh/app:123 && docker push dhh/app:latest", "pack build dhh/app --platform linux/amd64 --builder heroku/builder:24 --buildpack heroku/ruby --buildpack heroku/procfile --buildpack paketo-buildpacks/image-labels -t dhh/app:123 -t dhh/app:latest --env BP_IMAGE_LABELS=service=app --path . && docker push dhh/app:123 && docker push dhh/app:latest",
builder.push.join(" ") builder.push.join(" ")