From 90f232fb8ff9347b89d1a157433891630413a54d Mon Sep 17 00:00:00 2001 From: twentyOne2x Date: Mon, 6 Jul 2026 20:35:56 +0200 Subject: [PATCH] Add GCP staging container smoke --- .dockerignore | 21 +++++++++++++++++++++ Dockerfile.gcp-staging | 30 ++++++++++++++++++++++++++++++ cloudbuild.gcp-staging.yaml | 11 +++++++++++ docker/gcp-staging-smoke.sh | 30 ++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile.gcp-staging create mode 100644 cloudbuild.gcp-staging.yaml create mode 100644 docker/gcp-staging-smoke.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8844ca8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,21 @@ +.git +.venv +__pycache__ +*.pyc +.pytest_cache +.ruff_cache +.mypy_cache +.env +*.env +secrets/ +telegram-archives/ +transcripts/ +logs/ +pipeline.db +pipeline.db-* +*.sqlite +*.sqlite3 +agentcash/ +.agentcash/ +.hermes/ +node_modules/ diff --git a/Dockerfile.gcp-staging b/Dockerfile.gcp-staging new file mode 100644 index 0000000..e37a267 --- /dev/null +++ b/Dockerfile.gcp-staging @@ -0,0 +1,30 @@ +FROM python:3.11-slim + +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +ENV PIPELINE_BASE=/opt/teleo-eval + +WORKDIR /app + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates curl git bash \ + && rm -rf /var/lib/apt/lists/* + +COPY pyproject.toml README.md /app/ +COPY lib /app/lib +COPY tests /app/tests +COPY scripts /app/scripts +COPY fixtures /app/fixtures +COPY schemas /app/schemas +COPY systemd /app/systemd +COPY deploy /app/deploy +COPY diagnostics /app/diagnostics +COPY telegram /app/telegram +COPY teleo-pipeline.py /app/teleo-pipeline.py +COPY docker/gcp-staging-smoke.sh /usr/local/bin/gcp-staging-smoke + +RUN pip install --no-cache-dir --upgrade pip \ + && pip install --no-cache-dir -e ".[dev]" \ + && chmod +x /usr/local/bin/gcp-staging-smoke + +CMD ["/usr/local/bin/gcp-staging-smoke"] diff --git a/cloudbuild.gcp-staging.yaml b/cloudbuild.gcp-staging.yaml new file mode 100644 index 0000000..380a905 --- /dev/null +++ b/cloudbuild.gcp-staging.yaml @@ -0,0 +1,11 @@ +steps: + - name: gcr.io/cloud-builders/docker + args: + - build + - -f + - Dockerfile.gcp-staging + - -t + - europe-west6-docker.pkg.dev/teleo-501523/teleo/teleo-pipeline-gcp-staging:66ecbf3-20260706 + - . +images: + - europe-west6-docker.pkg.dev/teleo-501523/teleo/teleo-pipeline-gcp-staging:66ecbf3-20260706 diff --git a/docker/gcp-staging-smoke.sh b/docker/gcp-staging-smoke.sh new file mode 100644 index 0000000..74309a8 --- /dev/null +++ b/docker/gcp-staging-smoke.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd /app + +python -m compileall -q lib telegram diagnostics teleo-pipeline.py + +python -m pytest -q \ + tests/test_agent_routing.py \ + tests/test_decision_engine_replay.py \ + tests/test_phase1b_end_to_end.py \ + tests/test_research_eval_schema_sql.py \ + tests/test_teleo_agent_systemd.py + +python - <<'PY' +import json +from lib.agent_routing import classify_pr_route + +route = classify_pr_route( + "diff --git a/domains/internet-finance/x402-wallets.md b/domains/internet-finance/x402-wallets.md\n" + "+AI systems route agents around x402 payments and agent wallets.\n" +) + +print(json.dumps({ + "smoke": "teleo-gcp-staging-ok", + "primary_agent": route.primary_agent, + "required_agents": list(route.required_agents), + "route_kind": route.route_kind, +}, sort_keys=True)) +PY