add --target option for builder configuration

This commit is contained in:
Jason Nochlin
2024-04-27 10:24:34 -06:00
parent f48f528043
commit 947be0877f
3 changed files with 17 additions and 2 deletions

View File

@@ -83,6 +83,13 @@ class CommandsBuilderTest < ActiveSupport::TestCase
end
end
test "build target" do
builder = new_builder_command(builder: { "target" => "prod" })
assert_equal \
"-t dhh/app:123 -t dhh/app:latest --label service=\"app\" --file Dockerfile --target prod",
builder.target.build_options.join(" ")
end
test "build context" do
builder = new_builder_command(builder: { "context" => ".." })
assert_equal \