Skip to content

Commit 7a2bb2d

Browse files
mpk-droidclaude
andcommitted
feat: use build-openshift instead of local build+push
Build the container image directly on the cluster via OpenShift BuildConfig, removing the need for local Docker/Podman and external registry credentials. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3904b0c commit 7a2bb2d

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

agents/langgraph/react_agent/tests/integration/test_deployment.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
logger = logging.getLogger(__name__)
1515

1616
AGENT_NAME = "langgraph-react-agent"
17+
INTERNAL_REGISTRY = "image-registry.openshift-image-registry.svc:5000"
1718

1819

1920
@pytest.fixture(scope="module")
@@ -23,16 +24,17 @@ def agent_dir(repo_root):
2324

2425
@pytest.fixture(scope="module")
2526
def deployed_agent(cluster_auth, agent_dir):
27+
namespace = cluster_auth["namespace"]
28+
container_image = f"{INTERNAL_REGISTRY}/{namespace}/{AGENT_NAME}:latest"
29+
deploy_env = {"CONTAINER_IMAGE": container_image}
30+
2631
deployed = False
2732
try:
28-
logger.info("Building container image...")
29-
run_make("build", cwd=agent_dir, timeout=600)
30-
31-
logger.info("Pushing container image...")
32-
run_make("push", cwd=agent_dir, timeout=300)
33+
logger.info("Building image on cluster via build-openshift...")
34+
run_make("build-openshift", cwd=agent_dir, timeout=600)
3335

3436
logger.info("Deploying to cluster...")
35-
run_make("deploy", cwd=agent_dir, timeout=300)
37+
run_make("deploy", cwd=agent_dir, timeout=300, env=deploy_env)
3638
deployed = True
3739

3840
route_url = get_route(AGENT_NAME)

0 commit comments

Comments
 (0)