Utilize repository name for pack name

This commit is contained in:
Nick Hammond
2024-09-04 09:42:40 -07:00
parent 826308aabd
commit d0ffb850da
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ class Kamal::Commands::Builder::Native::Pack < Kamal::Commands::Builder::Native
def push def push
combine \ combine \
pack(:build, pack(:build,
config.absolute_image, config.repository,
"--platform", platform, "--platform", platform,
"--builder", pack_builder, "--builder", pack_builder,
buildpacks, buildpacks,

View File

@@ -54,10 +54,10 @@ 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(builder: { "pack" => { "arch" => "amd64", "builder" => "heroku/builder:24", "buildpacks" => [ "heroku/ruby", "heroku/procfile" ] } }) builder = new_builder_command(image: "dhh/app", builder: { "pack" => { "arch" => "amd64", "builder" => "heroku/builder:24", "buildpacks" => [ "heroku/ruby", "heroku/procfile" ] } })
assert_equal "native/pack", builder.name assert_equal "native/pack", builder.name
assert_equal \ assert_equal \
"pack build dhh/app:123 --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(" ")
end end