@cloud-cli/on 1.14.0 → 1.15.1
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/README.md +29 -4
- package/dist/debug.d.ts +2 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/drivers/standard-process.driver.d.ts.map +1 -1
- package/dist/drivers/systemd.driver.d.ts.map +1 -1
- package/dist/on.js +1321 -1318
- package/dist/parser/matrix-expander.d.ts +1 -1
- package/dist/safe-eval.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/types.d.ts +2 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/worker.d.ts.map +1 -1
- package/dist/workflows.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Designed with a strict **security-first boundary**, native **JavaScript AST eval
|
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
27
|
my-project/
|
|
28
|
-
├── runner.config.mjs #
|
|
28
|
+
├── runner.config.mjs # Optional plugin/advanced configuration
|
|
29
29
|
└── package.json
|
|
30
30
|
|
|
31
31
|
```
|
|
@@ -263,6 +263,7 @@ Within `${...}`, `if:`, and `eval:` contexts, the following object scopes are ex
|
|
|
263
263
|
- **`env`**: Merged environment variables from global config and workflow definitions.
|
|
264
264
|
- **`secrets`**: Unmasked job-scoped values from encrypted central secret storage.
|
|
265
265
|
- **`steps`**: Execution statuses and outputs from previous steps in the workflow (`steps.<id>.status`, `steps.<id>.outputs`).
|
|
266
|
+
- **`files`**: Workspace-bound file helpers for `if:` and `eval:` expressions: `files.exists('Dockerfile')`, `files.readFile('package.json')`, and `files.join('dist', 'artifact')`. Paths outside the job `workingDir` are rejected.
|
|
266
267
|
- **`BUILTIN_HELPERS`**: JS utilities including `String`, `Number`, `Boolean`, and `JSON.parse` / `JSON.stringify`.
|
|
267
268
|
|
|
268
269
|
---
|
|
@@ -276,15 +277,22 @@ The Ingress Gateway listens for incoming HTTP requests and serves the live web U
|
|
|
276
277
|
| Method | Endpoint | Description |
|
|
277
278
|
| ---------- | ------------------ | -------------------------------------------------------------------------------------- |
|
|
278
279
|
| **`POST`** | `/webhooks/github` | Webhook endpoint for GitHub events. Applies GitHub filters and evaluates `on.github.if`. |
|
|
279
|
-
| **`GET`** | `/runs` | **Dashboard:**
|
|
280
|
+
| **`GET`** | `/runs` | **Dashboard:** Public live dark-mode monitoring page listing recent jobs. |
|
|
280
281
|
| **`GET`** | `/api/jobs?afterId=<id>&beforeId=<id>&limit=<n>` | Dashboard jobs with exclusive lower and upper ID cursors and a limit from 1 to 500 (default 50). |
|
|
281
|
-
| **`GET`** | `/runs/:jobId` | **Job Report:**
|
|
282
|
+
| **`GET`** | `/runs/:jobId` | **Job Report:** Authenticated interactive trace with step timings and terminal log output. |
|
|
283
|
+
| **`GET`** | `/workflows` | Authenticated workflow list and encrypted secret management UI. |
|
|
284
|
+
| **`GET`** | `/workflows/new`, `/workflows/:id` | Authenticated YAML workflow editor. |
|
|
285
|
+
| **`POST`** | `/api/workflows/validate` | Authenticated YAML validation without persistence. |
|
|
286
|
+
| **`GET`, `PUT`, `DELETE`** | `/api/workflows/:id` | Authenticated revisioned workflow read, draft save, and deletion. |
|
|
287
|
+
| **`POST`** | `/api/workflows/:id/publish` | Authenticated publication of the latest draft revision. |
|
|
288
|
+
| **`GET`, `PUT`, `DELETE`** | `/api/secrets`, `/api/secrets/:name` | Authenticated encrypted secret-name and write-only value management. |
|
|
282
289
|
|
|
283
290
|
### Dashboard Features
|
|
284
291
|
|
|
285
292
|
- **Real-time Auto-Refresh:** `/runs` automatically refreshes job queue statuses (`PENDING`, `RUNNING`, `SUCCESS`, `FAILED`, `CANCELLED`).
|
|
286
293
|
- **ANSI Terminal Rendering:** Uses `ansi_up` to render bash colors, bold highlights, and console outputs accurately in step log boxes.
|
|
287
294
|
- **Payload Inspection:** View JSON inputs received from webhooks for easy debugging.
|
|
295
|
+
- **Workflow Management:** Use the authenticated `/workflows` pages to create, validate, publish, edit, and delete DB-authored workflow revisions.
|
|
288
296
|
|
|
289
297
|
---
|
|
290
298
|
|
|
@@ -297,7 +305,7 @@ The Ingress Gateway listens for incoming HTTP requests and serves the live web U
|
|
|
297
305
|
3. **Payload Size Guard:**
|
|
298
306
|
The Ingress server enforces a strict 5MB payload limit to prevent Out-Of-Memory (OOM) denial-of-service attacks.
|
|
299
307
|
4. **Single-operator API authentication:**
|
|
300
|
-
Workflow validation, publishing, secret management, and job details require `RUNNER_ADMIN_SECRET` over HTTPS.
|
|
308
|
+
Workflow validation, publishing, secret management, and job details require `RUNNER_ADMIN_SECRET` over HTTPS. Workers use the separate `RUNNER_WORKER_SECRET` only for lifecycle events and secrets of jobs they have claimed.
|
|
301
309
|
|
|
302
310
|
## systemd Deployment
|
|
303
311
|
|
|
@@ -315,6 +323,23 @@ Workers now resolve the immutable revision when they claim a job. A workflow can
|
|
|
315
323
|
|
|
316
324
|
This MVP intentionally supports one trusted operator. Before sharing the UI or exposing it beyond a private deployment, add individual accounts and roles, secure browser sessions and CSRF protection, audit logs, worker enrollment credentials, secret key rotation, encrypted systemd credentials, rate limiting, and database high availability.
|
|
317
325
|
|
|
326
|
+
## Planned Runner Rollouts
|
|
327
|
+
|
|
328
|
+
Package-managed workers currently update on a staggered daily timer. Before enabling automatic promotion of newly released runner versions, implement a controlled canary rollout:
|
|
329
|
+
|
|
330
|
+
1. Publish a new immutable npm version and resolve the exact version behind the candidate tag.
|
|
331
|
+
2. Install that exact version on one designated canary worker, never a moving tag during the rollout.
|
|
332
|
+
3. Stage releases in versioned directories and atomically switch a `current` symlink only after installation and a local smoke check succeed.
|
|
333
|
+
4. Drain the canary with `SIGUSR1`, restart it, and retain prior release directories for rollback.
|
|
334
|
+
5. Require the canary to report a heartbeat containing its worker ID, running version, health state, and last-seen time.
|
|
335
|
+
6. Run a dedicated `runner-health` workflow with `tags: [canary]` to verify queue claiming, revision lookup, job-scoped secret retrieval, and the execution driver.
|
|
336
|
+
7. Record rollout state durably: candidate version, canary worker, status, promotion time, and failure reason.
|
|
337
|
+
8. Promote only a healthy candidate with `npm dist-tag add @cloud-cli/on@<version> stable`.
|
|
338
|
+
9. Configure normal daily worker updates to install `@cloud-cli/on@stable`, with a rollout concurrency limit of one worker.
|
|
339
|
+
10. On failed installation, restart, heartbeat, or health check, mark the candidate rejected, leave `stable` unchanged, and roll the canary back to its prior version.
|
|
340
|
+
|
|
341
|
+
SSE should notify workers that an update is available, but the control-plane database must remain the authoritative rollout state so disconnected workers converge safely after reconnecting.
|
|
342
|
+
|
|
318
343
|
## Development
|
|
319
344
|
|
|
320
345
|
```bash
|
package/dist/debug.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAEA,wBAAgB,KAAK,CAAC,GAAG,IAAI,OAAA,QAE5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-process.driver.d.ts","sourceRoot":"","sources":["../../src/drivers/standard-process.driver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAc,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"standard-process.driver.d.ts","sourceRoot":"","sources":["../../src/drivers/standard-process.driver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAc,MAAM,aAAa,CAAC;AAG5F,qBAAa,qBAAsB,YAAW,eAAe;IAC3D,IAAI,SAAsB;IAEpB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC,OAAO,CAAC,GAAG,EAAE,WAAW,GAAG,mBAAmB;IAuI9C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAuBlB,OAAO,CAAC,IAAI,EAAE,MAAM;CAG3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemd.driver.d.ts","sourceRoot":"","sources":["../../src/drivers/systemd.driver.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAc,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"systemd.driver.d.ts","sourceRoot":"","sources":["../../src/drivers/systemd.driver.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAc,MAAM,aAAa,CAAC;AAK5F,qBAAa,aAAc,YAAW,eAAe;IACnD,IAAI,SAAa;IAEX,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAQrC,OAAO,CAAC,GAAG,EAAE,WAAW,GAAG,mBAAmB;IAwJxC,OAAO,CAAC,IAAI,EAAE,MAAM;CAS3B"}
|