openci-worker-cli
v0.1.22
Published
OpenCI Worker CLI
Readme
OpenCI Worker CLI (Node.js)
Node.js implementation of the OpenCI worker. It claims queued build jobs from SQL Connect, creates build runs, streams logs back to SQL Connect, runs the workflow with act, and runs build-job follow-up work directly through the shared Data Connect Admin SDK services.
Usage
Install from npm:
npm install -g openci-worker-cli
openci_worker --service-account /path/to/service-account.json --worker-id worker-1By default, the worker uses the generated SQL Connect SDK configuration
(openci in asia-northeast1). You can override it explicitly when needed:
openci_worker \
--service-account /path/to/service-account.json \
--worker-id worker-1 \
--dataconnect-service-id openci \
--dataconnect-location asia-northeast1The same override is also available via environment variables:
OPENCI_DATACONNECT_SERVICE_ID=openci \
OPENCI_DATACONNECT_LOCATION=asia-northeast1 \
openci_worker --service-account /path/to/service-account.json --worker-id worker-1Run from source:
npm install
npm run build
node dist/index.cjs --service-account /path/to/service-account.json --worker-id worker-1For a single-job smoke test:
node dist/index.cjs --service-account /path/to/service-account.json --worker-id worker-1 --onceThe worker claims ubuntu jobs on Linux and runs them inside openci-ubuntu:latest. On macOS it claims macos jobs and runs them inside a cloned Lume VM.
Publishing
The worker build bundles the generated Data Connect Admin SDK and shared build-job services into dist/index.cjs so it can be installed from npm without repository-local file: dependencies.
Before publishing from this package directory:
npm run pack:dry-run
npm publishThe dry run should only include dist, README.md, and package.json; it should not list ../../packages/... paths or bundled dependencies.
Requirements
- Node.js 22
- A Firebase service account JSON with Data Connect, Secret Manager, and FCM permissions
actavailable in the worker runtime- Linux workers: Docker and the
openci-ubuntu:latestimage - macOS workers: Lume and the
tahoe-base_v1.1.1base VM
