deepdebug-local-agent 1.0.22 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/context.md +76 -0
- package/.claude/skills/README.md +25 -0
- package/.claude/skills/tdd-debugging/SKILL.md +53 -0
- package/.claude/skills/tdd-debugging/references/anti-patterns.md +43 -0
- package/.claude/skills/tdd-debugging/references/command-reference.md +46 -0
- package/.claude/standards/README.md +51 -0
- package/.claude/standards/clean-code.md +75 -0
- package/.claude/standards/code-review-checklist.md +61 -0
- package/.claude/standards/layered-architecture.md +163 -0
- package/.claude/standards/node.md +45 -0
- package/.claude/standards/security-owasp.md +114 -0
- package/.claude/standards/simplicity.md +42 -0
- package/.claude/standards/solid.md +64 -0
- package/.claude/standards/testing.md +59 -0
- package/.cursor/rules/standards.mdc +17 -0
- package/.github/workflows/build-byoc-image.yml +315 -0
- package/.github/workflows/deploy-gcp.yml +102 -0
- package/.github/workflows/npm-publish.yml +69 -8
- package/AGENTS.md +21 -0
- package/CHANGELOG.md +69 -0
- package/CLAUDE.md +13 -0
- package/CLAUDE_CODE_AGENT_INFINITE.md +5 -3
- package/Dockerfile +4 -0
- package/Dockerfile.full +55 -3
- package/README.md +81 -0
- package/bin/install.js +16 -5
- package/cloudbuild-full.yaml +57 -0
- package/docker-compose.yml +5 -3
- package/docs/OBSERVABILITY.md +164 -0
- package/docs/byoc-agent-image.md +70 -0
- package/docs/graphify-packaging-plan.md +133 -0
- package/docs/graphify-validation-run-2026-10-28.md +243 -0
- package/docs/legacy-connectors.md +268 -0
- package/docs/releasing.md +43 -0
- package/docs/signed-commands.md +163 -0
- package/env.example +30 -0
- package/helm/Chart.yaml +2 -2
- package/helm/templates/deployment.yaml +13 -3
- package/helm/templates/networkpolicy.yaml +22 -0
- package/helm/templates/secret.yaml +1 -0
- package/helm/values.yaml +13 -14
- package/mcp-server.js +4 -1
- package/package.json +12 -4
- package/scripts/sync-fixtures.mjs +246 -0
- package/scripts/upgrade-observability-push.sh +227 -0
- package/src/adapters/as400/as400-parser.js +12 -0
- package/src/adapters/as400/index.js +134 -0
- package/src/adapters/cobol/cobol-parser.js +37 -0
- package/src/adapters/cobol/index.js +151 -0
- package/src/adapters/ibmmq/ibmmq-parser.js +23 -0
- package/src/adapters/ibmmq/index.js +137 -0
- package/src/adapters/index.js +79 -0
- package/src/adapters/oracle-forms/index.js +145 -0
- package/src/adapters/oracle-forms/oracle-forms-parser.js +11 -0
- package/src/adapters/sap/index.js +146 -0
- package/src/adapters/sap/sap-parser.js +41 -0
- package/src/ai-engine.js +22 -22
- package/src/config/trusted-signing-keys.json +3 -0
- package/src/detectors/build-tool-detector.js +50 -0
- package/src/detectors/multi-project-detector.js +22 -22
- package/src/detectors/service-detector.js +24 -24
- package/src/exec-utils.js +26 -4
- package/src/git/base-git-provider.js +117 -117
- package/src/git/bitbucket-provider.js +2 -2
- package/src/git/git-provider-registry.js +18 -18
- package/src/git/github-provider.js +13 -13
- package/src/git/multi-repo-pr.js +161 -0
- package/src/mcp-http-server.js +32 -16
- package/src/observability/bundle-files.js +418 -0
- package/src/observability/detect.js +151 -0
- package/src/observability/provision.js +212 -0
- package/src/observability/render-cli.js +59 -0
- package/src/observability/routes.js +88 -0
- package/src/patch/patch-engine.js +28 -28
- package/src/patch-manager.js +85 -85
- package/src/patch_bkp.js +14 -14
- package/src/ports.js +4 -4
- package/src/routes/workspace.route.js +47 -16
- package/src/runtimes/base-runtime.js +75 -75
- package/src/runtimes/java/gradle-runtime.js +17 -17
- package/src/runtimes/java/java-integrations.js +25 -25
- package/src/runtimes/java/maven-runtime.js +34 -34
- package/src/runtimes/node/node-integrations.js +1 -1
- package/src/runtimes/node/npm-runtime.js +14 -14
- package/src/runtimes/node/yarn-runtime.js +4 -4
- package/src/runtimes/runtime-registry.js +25 -25
- package/src/server-local.js +4 -4
- package/src/server.js +1412 -335
- package/src/siblings/burst-suppressor.js +89 -0
- package/src/siblings/capabilities.js +273 -0
- package/src/siblings/env-compat.cjs +58 -0
- package/src/siblings/incident-forwarder.js +320 -0
- package/src/siblings/logger.js +15 -0
- package/src/siblings/metrics.js +94 -0
- package/src/utils/agent-auth.js +184 -0
- package/src/utils/approval-token.js +56 -0
- package/src/utils/bind-host.js +29 -0
- package/src/utils/branch-refspec.js +98 -0
- package/src/utils/child-env.js +34 -0
- package/src/utils/environment-diagnostics.js +55 -55
- package/src/utils/exec-policy.js +962 -0
- package/src/utils/exec-utils.js +15 -15
- package/src/utils/file-count.js +46 -0
- package/src/utils/fs-utils.js +10 -10
- package/src/utils/multi-repo-open.js +132 -0
- package/src/utils/open-gate.js +183 -0
- package/src/utils/ranged-read.js +65 -0
- package/src/utils/request-guards.js +77 -0
- package/src/utils/request-signing.js +342 -0
- package/src/utils/root-recovery.js +244 -0
- package/src/utils/safe-exec-args.js +58 -0
- package/src/utils/sandbox.js +182 -0
- package/src/utils/search-outcome.js +56 -0
- package/src/utils/workspace-root.js +80 -0
- package/src/validators/syntax-validator.js +149 -0
- package/src/workspace/detect-port.js +16 -16
- package/src/workspace/file-reader.js +1 -1
- package/src/workspace/process-manager.js +46 -46
- package/src/workspace-manager.js +86 -24
- package/test/adapters/as400/as400.test.js +121 -0
- package/test/adapters/cobol/cobol.test.js +217 -0
- package/test/adapters/ibmmq/ibmmq.test.js +122 -0
- package/test/adapters/oracle-forms/oracle-forms.test.js +180 -0
- package/test/adapters/registry.test.js +108 -0
- package/test/adapters/sap/sap.test.js +142 -0
- package/test/agent-auth.test.js +194 -0
- package/test/bind-host.test.js +26 -0
- package/test/branch-refspec.test.js +224 -0
- package/test/burst-suppressor.test.js +60 -0
- package/test/capabilities-access.test.js +47 -0
- package/test/capabilities.test.js +87 -0
- package/test/child-env.test.js +23 -0
- package/test/env-compat.test.js +71 -0
- package/test/exec-policy.test.js +463 -0
- package/test/file-count.test.js +64 -0
- package/test/incident-forwarder.test.js +231 -0
- package/test/multi-repo-open.test.js +180 -0
- package/test/multi-repo-pr.test.js +129 -0
- package/test/observability-detect.test.js +199 -0
- package/test/open-gate.test.js +341 -0
- package/test/ranged-read.test.js +60 -0
- package/test/request-guards.test.js +91 -0
- package/test/request-signing.test.js +284 -0
- package/test/root-recovery-sidecar.test.js +171 -0
- package/test/root-recovery.test.js +274 -0
- package/test/safe-exec-args.test.js +58 -0
- package/test/sandbox.test.js +98 -0
- package/test/search-outcome.test.js +50 -0
- package/test/workspace-root.test.js +64 -0
- package/tools/graphify-validation/README.md +92 -0
- package/tools/graphify-validation/config/questions.json +31 -0
- package/tools/graphify-validation/config/repos.json +9 -0
- package/tools/graphify-validation/config/symbols.json +6 -0
- package/tools/graphify-validation/fixtures/spring/expected.json +34 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/AppConfig.java +29 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/AuditLogger.java +15 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/Cache.java +7 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/CheckoutService.java +25 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/InMemoryCache.java +18 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/OrderController.java +22 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/PaymentGateway.java +5 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/PaypalGateway.java +11 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/RefundService.java +14 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/StripeGateway.java +11 -0
- package/tools/graphify-validation/lib/affected_vs_rg.py +81 -0
- package/tools/graphify-validation/lib/audit_hook/sitecustomize.py +22 -0
- package/tools/graphify-validation/lib/graph_metrics.py +96 -0
- package/tools/graphify-validation/lib/gv_common.py +130 -0
- package/tools/graphify-validation/lib/licenses.py +47 -0
- package/tools/graphify-validation/lib/pip_audit_summary.py +18 -0
- package/tools/graphify-validation/lib/recall.py +115 -0
- package/tools/graphify-validation/lib/report.py +226 -0
- package/tools/graphify-validation/lib/run_all.py +237 -0
- package/tools/graphify-validation/lib/run_graphify.py +144 -0
- package/tools/graphify-validation/lib/rusage_helper.py +17 -0
- package/tools/graphify-validation/lib/sample_edges.py +246 -0
- package/tools/graphify-validation/lib/spring_fixture.py +81 -0
- package/tools/graphify-validation/requirements-py311.lock +508 -0
- package/tools/graphify-validation/requirements-tools.in +1 -0
- package/tools/graphify-validation/requirements-tools.lock +371 -0
- package/tools/graphify-validation/requirements.in +1 -0
- package/tools/graphify-validation/requirements.lock +502 -0
- package/tools/graphify-validation/run.sh +43 -0
- package/tools/graphify-validation/tests/test_harness.py +151 -0
- package/cloudbuild-agent-qa.yaml +0 -43
- package/cloudbuild-agent-staging.yaml +0 -40
- package/cloudbuild.yaml.deprecated +0 -42
- package/src/local-agent-source.tar.gz +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"""Unit tests for the harness logic (no graphify needed). Run: python3 -m unittest discover -s tools/graphify-validation/tests"""
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import tempfile
|
|
5
|
+
import unittest
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "lib"))
|
|
9
|
+
|
|
10
|
+
import affected_vs_rg # noqa: E402
|
|
11
|
+
import graph_metrics as gm # noqa: E402
|
|
12
|
+
import recall # noqa: E402
|
|
13
|
+
import report # noqa: E402
|
|
14
|
+
import sample_edges as se # noqa: E402
|
|
15
|
+
import spring_fixture as sf # noqa: E402
|
|
16
|
+
from gv_common import files_with_word, is_test_path # noqa: E402
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def mini_graph():
|
|
20
|
+
nodes = [
|
|
21
|
+
{"id": "svc", "label": "Svc", "source_file": "src/Svc.java", "source_location": "L3"},
|
|
22
|
+
{"id": "svc_file", "label": "Svc.java", "source_file": "src/Svc.java", "source_location": "L1"},
|
|
23
|
+
{"id": "svc_run", "label": ".run()", "source_file": "src/Svc.java", "source_location": "L8"},
|
|
24
|
+
{"id": "repo", "label": "Repo", "source_file": "src/Repo.java", "source_location": "L2"},
|
|
25
|
+
{"id": "repo_save", "label": ".save()", "source_file": "src/Repo.java", "source_location": "L4"},
|
|
26
|
+
{"id": "other", "label": "Other", "source_file": "src/Other.java", "source_location": "L2"},
|
|
27
|
+
{"id": "other_save", "label": ".save()", "source_file": "src/Other.java", "source_location": "L4"},
|
|
28
|
+
{"id": "empty_file", "label": "Empty.java", "source_file": "src/Empty.java", "source_location": "L1"},
|
|
29
|
+
]
|
|
30
|
+
links = [
|
|
31
|
+
{"source": "svc", "target": "svc_run", "relation": "method", "confidence": "EXTRACTED"},
|
|
32
|
+
{"source": "repo", "target": "repo_save", "relation": "method", "confidence": "EXTRACTED"},
|
|
33
|
+
{"source": "other", "target": "other_save", "relation": "method", "confidence": "EXTRACTED"},
|
|
34
|
+
{"source": "svc_run", "target": "repo_save", "relation": "calls", "confidence": "INFERRED", "source_file": "src/Svc.java", "source_location": "L9"},
|
|
35
|
+
{"source": "svc_run", "target": "other_save", "relation": "calls", "confidence": "INFERRED", "source_file": "src/Svc.java", "source_location": "L10"},
|
|
36
|
+
]
|
|
37
|
+
return {"nodes": nodes, "links": links}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class OracleTests(unittest.TestCase):
|
|
41
|
+
def setUp(self):
|
|
42
|
+
self.tmp = tempfile.TemporaryDirectory()
|
|
43
|
+
root = Path(self.tmp.name)
|
|
44
|
+
(root / "src").mkdir()
|
|
45
|
+
(root / "src/Svc.java").write_text("class Svc {\n private final Repo repo;\n\n\n\n\n\n void run() {\n repo.save(1);\n repo.save(2);\n }\n}\n")
|
|
46
|
+
self.root = root
|
|
47
|
+
|
|
48
|
+
def tearDown(self):
|
|
49
|
+
self.tmp.cleanup()
|
|
50
|
+
|
|
51
|
+
def test_oracle_accepts_matching_receiver_and_rejects_other_class(self):
|
|
52
|
+
g = mini_graph()
|
|
53
|
+
ns, owner, supers = gm.class_index(g)
|
|
54
|
+
ok = se.java_oracle(g["links"][3], ns, owner, supers, self.root)
|
|
55
|
+
bad = se.java_oracle(g["links"][4], ns, owner, supers, self.root)
|
|
56
|
+
self.assertEqual(ok[0], "ok")
|
|
57
|
+
self.assertEqual(bad[0], "wrong")
|
|
58
|
+
|
|
59
|
+
def test_g1_counts_file_level_node_only_files_as_missing(self):
|
|
60
|
+
g = mini_graph()
|
|
61
|
+
(self.root / "src/Repo.java").write_text("class Repo {}")
|
|
62
|
+
(self.root / "src/Other.java").write_text("class Other {}")
|
|
63
|
+
(self.root / "src/Empty.java").write_text("class Empty {")
|
|
64
|
+
r = gm.g1_extraction(g, self.root)
|
|
65
|
+
self.assertEqual(r["files_without_symbols"], ["src/Empty.java"])
|
|
66
|
+
self.assertEqual(r["code_files"], 4)
|
|
67
|
+
|
|
68
|
+
def test_sample_is_deterministic(self):
|
|
69
|
+
g = mini_graph()
|
|
70
|
+
a, _ = se.build_sample(g, self.root, n_ambiguous=1, n_other=5)
|
|
71
|
+
b, _ = se.build_sample(g, self.root, n_ambiguous=1, n_other=5)
|
|
72
|
+
self.assertEqual(a, b)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class MetricsTests(unittest.TestCase):
|
|
76
|
+
def test_signature_ignores_order(self):
|
|
77
|
+
g = mini_graph()
|
|
78
|
+
h = {"nodes": list(reversed(g["nodes"])), "links": list(reversed(g["links"]))}
|
|
79
|
+
self.assertEqual(gm.signature(g), gm.signature(h))
|
|
80
|
+
|
|
81
|
+
def test_parse_affected(self):
|
|
82
|
+
text = "Affected nodes for X\n- Foo [calls] src/a/Foo.java:L12\n- Bar [references] src/b/Bar.java:L3\nnoise\n"
|
|
83
|
+
self.assertEqual(affected_vs_rg.parse_affected(text), {"src/a/Foo.java", "src/b/Bar.java"})
|
|
84
|
+
|
|
85
|
+
def test_recall_ignores_tests_and_non_code(self):
|
|
86
|
+
ranking = ["src/test/java/FooTest.java", "README.md", "src/main/Foo.java", "src/main/Bar.java"]
|
|
87
|
+
r, hit = recall.recall_at(ranking, ["src/main/Foo.java", "src/main/Baz.java"], k=8)
|
|
88
|
+
self.assertEqual(r, 0.5)
|
|
89
|
+
self.assertEqual(hit, ["src/main/Foo.java"])
|
|
90
|
+
|
|
91
|
+
def test_is_test_path(self):
|
|
92
|
+
self.assertTrue(is_test_path("src/test/java/A.java"))
|
|
93
|
+
self.assertTrue(is_test_path("test/a.test.js"))
|
|
94
|
+
self.assertFalse(is_test_path("src/main/java/A.java"))
|
|
95
|
+
|
|
96
|
+
def test_rg_override_is_honoured(self):
|
|
97
|
+
with tempfile.TemporaryDirectory() as d:
|
|
98
|
+
(Path(d) / "a.java").write_text("class Guard {}")
|
|
99
|
+
old = os.environ.get("RG")
|
|
100
|
+
os.environ["RG"] = "/nonexistent/rg"
|
|
101
|
+
try:
|
|
102
|
+
with self.assertRaises(Exception):
|
|
103
|
+
files_with_word(d, "Guard")
|
|
104
|
+
finally:
|
|
105
|
+
if old is None:
|
|
106
|
+
del os.environ["RG"]
|
|
107
|
+
else:
|
|
108
|
+
os.environ["RG"] = old
|
|
109
|
+
|
|
110
|
+
def test_python_fallback_when_no_ripgrep(self):
|
|
111
|
+
with tempfile.TemporaryDirectory() as d:
|
|
112
|
+
(Path(d) / "a.java").write_text("class Guard {}")
|
|
113
|
+
(Path(d) / "b.java").write_text("class GuardRail {}")
|
|
114
|
+
old_rg, old_path = os.environ.pop("RG", None), os.environ.get("PATH")
|
|
115
|
+
os.environ["PATH"] = ""
|
|
116
|
+
try:
|
|
117
|
+
self.assertEqual(files_with_word(d, "Guard"), {"a.java"})
|
|
118
|
+
finally:
|
|
119
|
+
os.environ["PATH"] = old_path
|
|
120
|
+
if old_rg is not None:
|
|
121
|
+
os.environ["RG"] = old_rg
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class SpringTests(unittest.TestCase):
|
|
125
|
+
def test_reaches_and_edge_and_vacuous_not_reaches(self):
|
|
126
|
+
g = {"nodes": [
|
|
127
|
+
{"id": "a", "label": "A", "source_file": "A.java"}, {"id": "b", "label": "B", "source_file": "B.java"},
|
|
128
|
+
{"id": "c", "label": "C", "source_file": "C.java"}],
|
|
129
|
+
"links": [{"source": "a", "target": "b", "relation": "references", "confidence": "EXTRACTED"}]}
|
|
130
|
+
exp = {"headline_group": "g", "threshold_pct": 50, "groups": {"g": [
|
|
131
|
+
{"id": "e", "kind": "edge", "from": "A.java::A", "to": "B.java::B", "relations": ["references"]},
|
|
132
|
+
{"id": "r", "kind": "reaches", "from": "A.java::A", "to": "C.java::C", "depth": 2},
|
|
133
|
+
{"id": "n", "kind": "not_reaches", "requires": "r", "from": "A.java::A", "to": "C.java::C", "depth": 2}]}}
|
|
134
|
+
out = sf.check(g, exp)
|
|
135
|
+
items = {i["id"]: i for i in out["groups"]["g"]["items"]}
|
|
136
|
+
self.assertTrue(items["e"]["found"])
|
|
137
|
+
self.assertFalse(items["r"]["found"])
|
|
138
|
+
self.assertFalse(items["n"]["found"]) # vacuous because companion failed
|
|
139
|
+
self.assertIn("vacuous", items["n"]["detail"])
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class ReportTests(unittest.TestCase):
|
|
143
|
+
def test_render_handles_minimal_results(self):
|
|
144
|
+
res = {"environment": {"date_utc": "x", "graphify_version": "0", "python": "p", "os": "o", "cpu_count": 1, "ram_gb": 1, "ripgrep": "rg", "network_block": "n", "env_keys_passed": ["HOME"]}}
|
|
145
|
+
text = report.render(res)
|
|
146
|
+
self.assertIn("NAO MEDIDO", text)
|
|
147
|
+
self.assertIn("G10", text)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
if __name__ == "__main__":
|
|
151
|
+
unittest.main()
|
package/cloudbuild-agent-qa.yaml
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
steps:
|
|
2
|
-
# Step 1: Build Docker image
|
|
3
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
4
|
-
args:
|
|
5
|
-
- 'build'
|
|
6
|
-
- '--platform=linux/amd64'
|
|
7
|
-
- '-t'
|
|
8
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-qa:latest'
|
|
9
|
-
- '.'
|
|
10
|
-
timeout: '600s'
|
|
11
|
-
|
|
12
|
-
# Step 2: Push to Artifact Registry
|
|
13
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
14
|
-
args:
|
|
15
|
-
- 'push'
|
|
16
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-qa:latest'
|
|
17
|
-
|
|
18
|
-
# Step 3: Deploy to Cloud Run QA
|
|
19
|
-
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
|
|
20
|
-
entrypoint: 'gcloud'
|
|
21
|
-
args:
|
|
22
|
-
- 'run'
|
|
23
|
-
- 'deploy'
|
|
24
|
-
- 'deepdebug-local-agent-qa'
|
|
25
|
-
- '--image=us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-qa:latest'
|
|
26
|
-
- '--region=us-central1'
|
|
27
|
-
- '--platform=managed'
|
|
28
|
-
- '--allow-unauthenticated'
|
|
29
|
-
- '--memory=1Gi'
|
|
30
|
-
- '--cpu=1'
|
|
31
|
-
- '--min-instances=1'
|
|
32
|
-
- '--max-instances=3'
|
|
33
|
-
- '--port=5055'
|
|
34
|
-
- '--timeout=300'
|
|
35
|
-
- '--update-env-vars=NODE_ENV=qa'
|
|
36
|
-
|
|
37
|
-
images:
|
|
38
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-qa:latest'
|
|
39
|
-
|
|
40
|
-
options:
|
|
41
|
-
logging: CLOUD_LOGGING_ONLY
|
|
42
|
-
|
|
43
|
-
timeout: '1200s'
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
steps:
|
|
2
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
3
|
-
args:
|
|
4
|
-
- 'build'
|
|
5
|
-
- '--platform=linux/amd64'
|
|
6
|
-
- '-t'
|
|
7
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-staging:latest'
|
|
8
|
-
- '.'
|
|
9
|
-
timeout: '600s'
|
|
10
|
-
|
|
11
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
12
|
-
args:
|
|
13
|
-
- 'push'
|
|
14
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-staging:latest'
|
|
15
|
-
|
|
16
|
-
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
|
|
17
|
-
entrypoint: 'gcloud'
|
|
18
|
-
args:
|
|
19
|
-
- 'run'
|
|
20
|
-
- 'deploy'
|
|
21
|
-
- 'deepdebug-local-agent-staging'
|
|
22
|
-
- '--image=us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-staging:latest'
|
|
23
|
-
- '--region=us-central1'
|
|
24
|
-
- '--platform=managed'
|
|
25
|
-
- '--allow-unauthenticated'
|
|
26
|
-
- '--memory=1Gi'
|
|
27
|
-
- '--cpu=1'
|
|
28
|
-
- '--min-instances=1'
|
|
29
|
-
- '--max-instances=3'
|
|
30
|
-
- '--port=5055'
|
|
31
|
-
- '--timeout=300'
|
|
32
|
-
- '--update-env-vars=NODE_ENV=staging'
|
|
33
|
-
|
|
34
|
-
images:
|
|
35
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent-staging:latest'
|
|
36
|
-
|
|
37
|
-
options:
|
|
38
|
-
logging: CLOUD_LOGGING_ONLY
|
|
39
|
-
|
|
40
|
-
timeout: '1200s'
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
steps:
|
|
2
|
-
# Step 1: Build Docker image
|
|
3
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
4
|
-
args:
|
|
5
|
-
- 'build'
|
|
6
|
-
- '-t'
|
|
7
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent:latest'
|
|
8
|
-
- '.'
|
|
9
|
-
timeout: '600s'
|
|
10
|
-
|
|
11
|
-
# Step 2: Push to Artifact Registry
|
|
12
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
13
|
-
args:
|
|
14
|
-
- 'push'
|
|
15
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent:latest'
|
|
16
|
-
|
|
17
|
-
# Step 3: Deploy to Cloud Run
|
|
18
|
-
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
|
|
19
|
-
entrypoint: 'gcloud'
|
|
20
|
-
args:
|
|
21
|
-
- 'run'
|
|
22
|
-
- 'deploy'
|
|
23
|
-
- 'deepdebug-local-agent'
|
|
24
|
-
- '--image=us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent:latest'
|
|
25
|
-
- '--region=us-central1'
|
|
26
|
-
- '--platform=managed'
|
|
27
|
-
- '--allow-unauthenticated'
|
|
28
|
-
- '--memory=1Gi'
|
|
29
|
-
- '--cpu=1'
|
|
30
|
-
- '--min-instances=0'
|
|
31
|
-
- '--max-instances=5'
|
|
32
|
-
- '--port=8080'
|
|
33
|
-
- '--timeout=300'
|
|
34
|
-
- '--set-env-vars=NODE_ENV=production'
|
|
35
|
-
|
|
36
|
-
images:
|
|
37
|
-
- 'us-central1-docker.pkg.dev/insptechai/deepdebug-docker/local-agent:latest'
|
|
38
|
-
|
|
39
|
-
options:
|
|
40
|
-
logging: CLOUD_LOGGING_ONLY
|
|
41
|
-
|
|
42
|
-
timeout: '1200s'
|
|
Binary file
|