ops/devops: add console runner image CI build

This commit is contained in:
StellaOps Bot
2025-12-07 15:12:34 +02:00
parent b8641b1959
commit a403979177
4 changed files with 81 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
# Console CI runner (offline-friendly)
Status: runner spec + CI now wired to PRs; runner image scaffold now available with baked npm + Playwright cache.
Status: runner spec + CI now wired to PRs; runner image scaffold + CI build workflow now available with baked npm + Playwright cache.
## Runner profile
- OS: Ubuntu 22.04 LTS (x86_64) with Docker available for Playwright deps if needed.
@@ -29,6 +29,8 @@ Status: runner spec + CI now wired to PRs; runner image scaffold now available w
- Build locally: `IMAGE_TAG=stellaops/console-runner:offline OUTPUT_TAR=ops/devops/artifacts/console-runner/console-runner.tar ops/devops/console/build-runner-image.sh`
- `OUTPUT_TAR` optional; when set, the script saves the image for airgap transport.
- Runner expectations: `NPM_CONFIG_CACHE=~/.npm`, `PLAYWRIGHT_BROWSERS_PATH=~/.cache/ms-playwright` (paths already baked). Register the runner with a label (e.g., `console-ci`) and point `.gitea/workflows/console-ci.yml` at that runner pool.
- CI build helper: `ops/devops/console/build-runner-image-ci.sh` wraps the build, sets a run-scoped tag, emits metadata JSON, and saves a tarball under `ops/devops/artifacts/console-runner/`.
- CI workflow: `.gitea/workflows/console-runner-image.yml` (manual + path-trigger) builds the runner image and uploads the tarball + metadata as an artifact named `console-runner-image-<run_id>`.
### Seeding Playwright cache (one-time per runner image, host-based option)
```bash
@@ -39,3 +41,4 @@ ops/devops/console/seed_playwright.sh
## How to run
- PR-triggered via `.gitea/workflows/console-ci.yml`; restrict runners to images with baked Playwright cache.
- Manual `workflow_dispatch` remains available for dry runs or cache updates.
- To refresh the runner image, run the `console-runner-image` workflow or execute `ops/devops/console/build-runner-image-ci.sh` locally to generate a tarball and metadata for distribution.