Add cached image quickstart

This commit is contained in:
2026-07-09 17:25:50 +00:00
committed by claude
parent bfd3e659e8
commit 0cb8e67d0d
16 changed files with 440 additions and 10 deletions
+7
View File
@@ -118,6 +118,7 @@ def _plan(
with_egress: bool = False,
supervise: bool = False,
canary: bool = False,
image_policy: str = "fresh",
) -> DockerBottlePlan:
"""Build a fully-resolved DockerBottlePlan. Toggles cover the
matrix the renderer's conditional-service logic branches on."""
@@ -148,6 +149,7 @@ def _plan(
agent_name="demo",
copy_cwd=False,
user_cwd="/tmp/x",
image_policy=image_policy,
)
return DockerBottlePlan(
spec=spec,
@@ -300,6 +302,11 @@ class TestSidecarBundleShape(unittest.TestCase):
self.assertEqual("bot-bottle-sidecars:latest", sc["image"])
self.assertEqual("Dockerfile.sidecars", sc["build"]["dockerfile"])
def test_cached_policy_omits_bundle_build(self):
sc = self._render(image_policy="cached")["services"]["sidecars"]
self.assertEqual("bot-bottle-sidecars:latest", sc["image"])
self.assertNotIn("build", sc)
def test_bundle_container_name_uses_sidecars_prefix(self):
sc = self._render()["services"]["sidecars"]
self.assertEqual(f"bot-bottle-sidecars-{SLUG}", sc["container_name"])