-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.ci.jsonc
More file actions
77 lines (68 loc) · 2.57 KB
/
Copy pathwrangler.ci.jsonc
File metadata and controls
77 lines (68 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "gitflare-ci",
"main": "ci/index.ts",
"compatibility_date": "2026-08-06",
// @cloudflare/ci requires nodejs_compat for its `@cloudflare/ci/worker` entrypoint.
"compatibility_flags": ["nodejs_compat"],
"observability": { "enabled": true },
"vars": {
"ARTIFACTS_NAMESPACE": "gitflare",
// @cloudflare/ci reads this to address the R2 bucket over the S3 API when it
// stores sandbox snapshots. Must match the bucket_name below.
"BACKUP_BUCKET_NAME": "gitflare-ci-cache"
},
// Secrets (`wrangler secret put --config wrangler.ci.jsonc`):
// CLOUDFLARE_ACCOUNT_ID - account that owns the Artifacts namespace
// CF_TOKEN - API token the sandbox uses for `wrangler deploy` steps
// R2_ACCESS_KEY_ID - R2 S3 API token; created in the dashboard, not by wrangler
// R2_SECRET_ACCESS_KEY - secret half of the same S3 API token
"artifacts": [{ "binding": "ARTIFACTS", "namespace": "gitflare" }],
// Snapshot cache for `ci.runner({ cache: { inputs: [...] } })`.
"r2_buckets": [{ "binding": "BACKUP_BUCKET", "bucket_name": "gitflare-ci-cache" }],
"d1_databases": [
{
"binding": "DB",
"database_name": "gitflare",
"database_id": "6d8788b0-a346-472f-b13c-925272f42378"
}
],
"workflows": [
{
"binding": "CI_WORKFLOW",
"name": "gitflare-ci-workflow",
"class_name": "GitflareCI"
}
],
"containers": [
{
"class_name": "CiSandbox",
"image": "./ci/Dockerfile",
"instance_type": "standard-1",
"max_instances": 20
}
],
"durable_objects": {
"bindings": [
{ "name": "SANDBOX", "class_name": "CiSandbox" },
// Live log fan-out lives in the main Worker so the UI can subscribe to it
// without a second hop.
{ "name": "CI_LOGS", "class_name": "CiLogStream", "script_name": "gitflare" }
]
},
"migrations": [{ "tag": "v1", "new_sqlite_classes": ["CiSandbox"] }],
// Every push to any repo in the namespace starts a CI Workflow instance.
// Drop `repoName` from the filter to match all repos; keep the namespace so a
// second namespace on the same account cannot trigger these pipelines.
"triggers": {
"events": [
{
"type": "cf.artifacts.repo.pushed",
"filter": { "namespace": "gitflare" },
// `targets` (plural array), not the singular `target` shown in the
// announcement post — wrangler 4.119 rejects the latter.
"targets": [{ "type": "workflow", "workflow_name": "gitflare-ci-workflow" }]
}
]
}
}