Files
git.stella-ops.org/docs/modules/devops/export-ci-contract.md
StellaOps Bot c13355923f
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Console CI / console-ci (push) Has been cancelled
blocked 4
2025-11-23 17:53:41 +02:00

2.6 KiB

Export Center CI Contract (DEVOPS-EXPORT-35-001)

Goal: Deterministic, offline-friendly CI for Export Center services (WebService + Worker) with storage fixtures, smoke/perf gates, and observability artefacts.

Pipeline stages

  1. Setup
    • .NET SDK 10.x (cached); Node 20.x only if UI assets present.
    • Restore NuGet from local-nugets/ + cache; fail on external fetch (configure RestoreDisableParallel and source mapping).
    • Spin up MinIO (minio/minio:RELEASE.2024-10-08T09-56-18Z) via docker-compose fixture ops/devops/export/minio-compose.yml with deterministic creds (exportci/exportci123).
  2. Build & Lint
    • dotnet format --verify-no-changes on src/ExportCenter/**.
    • dotnet build src/ExportCenter/StellaOps.ExportCenter.WebService/StellaOps.ExportCenter.WebService.csproj -c Release /p:ContinuousIntegrationBuild=true.
  3. Unit/Integration Tests
    • dotnet test src/ExportCenter/__Tests/StellaOps.ExportCenter.Tests/StellaOps.ExportCenter.Tests.csproj -c Release --logger "trx;LogFileName=export-tests.trx"
    • Tests must use MinIO fixture with bucket export-ci and deterministic seed objects (see fixtures below).
  4. Perf/Smoke (optional gated)
    • dotnet test ... --filter Category=Smoke against live MinIO; cap runtime < 90s.
  5. Artifacts
    • Publish TRX to .artifacts/export-tests.trx.
    • Collect coverage to .artifacts/coverage (coverlet; lcov + summary).
    • Export appsettings used for the run to .artifacts/appsettings.ci.json.
    • Syft SBOM: syft dir:./src/ExportCenter -o spdx-json=.artifacts/exportcenter.spdx.json.
  6. Dashboards (seed)
    • Produce starter Grafana JSON with: request rate, p95 latency, MinIO error rate, queue depth, export job duration histogram. Store under .artifacts/grafana/export-center-ci.json for import.

Fixtures

  • MinIO compose file: ops/devops/export/minio-compose.yml (add if missing) with:
    • Access key: exportci
    • Secret key: exportci123
    • Bucket: export-ci
  • Seed object script: ops/devops/export/seed-minio.sh to create bucket and upload deterministic sample (sample-export.ndjson).

Determinism & Offline

  • No external network after restore; MinIO uses local image tag pinned above.
  • All timestamps emitted as UTC and tests assert deterministic ordering.
  • Coverage, SBOM, Grafana seed stored under .artifacts/ and uploaded.

Acceptance to clear blocker

  • CI run passes on clean runner with network blocked post-restore.
  • Artifacts (.trx, coverage, SBOM, Grafana JSON) uploaded and MinIO fixture exercised in tests.
  • Smoke perf subset completes < 90s.