Some checks failed
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
Policy Simulation / policy-simulate (push) Has been cancelled
sdk-generator-smoke / sdk-smoke (push) Has been cancelled
SDK Publish & Sign / sdk-publish (push) Has been cancelled
2.4 KiB
2.4 KiB
Deterministic Install & Headless Chromium
Offline runners must avoid ad-hoc network calls while staying reproducible. The Angular workspace now ships a locked dependency graph and helpers for provisioning a Chromium binary without embedding it directly in npm install.
Prerequisites
- Node.js 20.11.0 or newer (matches the
enginesconstraint). - npm 10.2.0 or newer.
- Local npm cache location available to both the connected “seed” machine and the offline runner (for example,
/opt/stellaops/npm-cache).
One-Time Cache Priming (Connected Host)
export NPM_CONFIG_CACHE=/opt/stellaops/npm-cache
npm run ci:install
ci:install executes npm ci --prefer-offline --no-audit --no-fund so every package and integrity hash lands in the cache without touching arbitrary registries afterwards.
If you plan to bundle a Chromium binary, download it while still connected:
npx @puppeteer/browsers install chrome@stable --path .cache/chromium
Archive both the npm cache and .cache/chromium/ directory; include them in your Offline Kit transfer.
Offline Runner Execution
- Extract the pre-warmed npm cache to the offline host and export
NPM_CONFIG_CACHEto that directory. - Optionally copy the
.cache/chromium/folder next topackage.json(the Karma launcher auto-detects platform-specific paths inside this directory). - Run
npm run ci:installto restore dependencies without network access. - Validate Chromium availability with
npm run verify:chromium. This command exits non-zero and prints the search paths if no binary is discovered. - Execute tests via
npm run test:ci(internally callsverify:chromiumbefore runningng test --watch=false).
Chromium Options
- System package – Install
chromium,chromium-browser, orgoogle-chrome-stablevia your distribution repository or the Offline Kit. The launcher checks/usr/bin/chromium-browser,/usr/bin/chromium, and/usr/bin/google-chrome(-stable)automatically. - Environment override – Set
CHROME_BINorSTELLAOPS_CHROMIUM_BINto the executable path if you host Chromium in a custom location. - Offline cache drop – Place the extracted archive under
.cache/chromium/(chrome-linux64/chrome,chrome-win64/chrome.exe, orchrome-mac/Chromium.app/...). The Karma harness resolves these automatically.
Consult src/Web/StellaOps.Web/README.md for a shortened operator flow overview.