Move image tag to proper position
This commit is contained in:
@@ -9,7 +9,7 @@ class Mrsk::Commands::Builder::Native < Mrsk::Commands::Builder::Base
|
|||||||
|
|
||||||
def push
|
def push
|
||||||
combine \
|
combine \
|
||||||
docker(:build, "-t", *build_args, *build_secrets, config.absolute_image, "."),
|
docker(:build, "-t", config.absolute_image, *build_args, *build_secrets, "."),
|
||||||
docker(:push, config.absolute_image)
|
docker(:push, config.absolute_image)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class CommandsBuilderTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
test "native push with build args" do
|
test "native push with build args" do
|
||||||
builder = new_builder_command(builder: { "multiarch" => false, "args" => { "a" => 1, "b" => 2 } })
|
builder = new_builder_command(builder: { "multiarch" => false, "args" => { "a" => 1, "b" => 2 } })
|
||||||
assert_equal [ :docker, :build, "-t", "--build-arg", "a=1", "--build-arg", "b=2", "dhh/app:123", ".", "&&", :docker, :push, "dhh/app:123" ], builder.push
|
assert_equal [ :docker, :build, "-t", "dhh/app:123", "--build-arg", "a=1", "--build-arg", "b=2", ".", "&&", :docker, :push, "dhh/app:123" ], builder.push
|
||||||
end
|
end
|
||||||
|
|
||||||
test "multiarch push with build args" do
|
test "multiarch push with build args" do
|
||||||
@@ -51,7 +51,7 @@ class CommandsBuilderTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
test "native push with with build secrets" do
|
test "native push with with build secrets" do
|
||||||
builder = new_builder_command(builder: { "multiarch" => false, "secrets" => [ "a", "b" ] })
|
builder = new_builder_command(builder: { "multiarch" => false, "secrets" => [ "a", "b" ] })
|
||||||
assert_equal [ :docker, :build, "-t", "--secret", "id=a", "--secret", "id=b", "dhh/app:123", ".", "&&", :docker, :push, "dhh/app:123" ], builder.push
|
assert_equal [ :docker, :build, "-t", "dhh/app:123", "--secret", "id=a", "--secret", "id=b", ".", "&&", :docker, :push, "dhh/app:123" ], builder.push
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
Reference in New Issue
Block a user