Skip to content

Commit

Permalink
test: remote definition with target
Browse files Browse the repository at this point in the history
  • Loading branch information
rcwbr authored Dec 6, 2024
1 parent 8ac6cf4 commit bdd5c5f
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,34 @@ def test_bake_with_variables_2(only_print, monkeypatch):
}


@pytest.mark.usefixtures("with_docker_driver")
@pytest.mark.usefixtures("change_cwd")
@pytest.mark.parametrize("only_print", [True, False])
def test_bake_with_remote_context_and_target(only_print):
config = docker.buildx.bake(
print=only_print,
targets=["my_out2"],
context="https://github.com/gabrieldemarmiesse/python-on-whales.git#v0.74.0:tests/python_on_whales/components/bake_tests",
)
assert config == {
"group": {"default": {"targets": ["my_out1", "my_out2"]}},
"target": {
"my_out1": {
"context": "https://github.com/gabrieldemarmiesse/python-on-whales.git#v0.74.0:tests/python_on_whales/components/bake_tests",
"dockerfile": "Dockerfile",
"tags": ["pretty_image1:1.0.0"],
"target": "out1",
},
"my_out2": {
"context": "https://github.com/gabrieldemarmiesse/python-on-whales.git#v0.74.0:tests/python_on_whales/components/bake_tests",
"dockerfile": "Dockerfile",
"tags": ["pretty_image2:1.0.0"],
"target": "out2",
},
},
}


@pytest.mark.usefixtures("with_docker_driver")
@pytest.mark.usefixtures("change_cwd")
@pytest.mark.parametrize("only_print", [True, False])
Expand Down

0 comments on commit bdd5c5f

Please sign in to comment.