CI: Pipelines fuer Fork-MRs, Testberichte im MR, Stack-Check der Images, Trivy+SBOM, Release-Preflight

Was die Pipeline neu kann:
- release:preflight prueft auf einem v*-Tag, dass frontend/api-package.json und CHANGELOG
  zum Tag passen und der Commit auf main liegt - bevor 40 Minuten Build anlaufen.
- test:* liefern JUnit (Fehler stehen im MR-Widget) und Coverage (Badge + Diff-Annotation);
  test:frontend misst das Bundle und zeigt im MR die Differenz zu main.
- verify:stack startet die gerade gepushten Images ueber die echte docker-compose.yml und
  fragt sie durch nginx ab; verify:scan (Trivy) scannt beide Images und legt je ein
  CycloneDX-SBOM ab, das der Release verlinkt.
- Der Release nennt Digests, Pull-Befehl und APK-SHA-256.
- mr:fork-pipelines startet die Pipelines von Fork-MRs bekannter Contributor hier im
  Projekt (Fork-Pipelines laufen sonst im Fork ohne Runner); Erstkontakte bekommen das
  Label ci-approval-needed. Braucht PIPELINE_API_TOKEN und den Zeitplan SCHEDULE_JOB=fork-mrs.

Korrekturen:
- web/Dockerfile: npm ci --ignore-scripts statt "npm ci || npm install" - der
  sharp/libvips-Download hatte v1.3.1 rot gemacht, und der Fallback ignorierte das Lockfile.
- interruptible + Retry bei Runner-Fehlern fuer alle Jobs, Timeouts pro Job,
  release-cli gepinnt, Docker-/Rules-Vorlagen statt Copy-Paste.
- Zeitplaene unterscheiden sich per SCHEDULE_JOB, damit Renovate und der MR-Starter sich
  nicht gegenseitig ausloesen.
This commit is contained in:
Duarte Santos committed 2026-09-04 14:06:50 +02:00
1 parent d6f0db9b4b
commit 2899f27fa6
11 files changed
+1259 -340

No files matched your search

+4 -1
View File
@@ -14,7 +14,10 @@ FROM --platform=$BUILDPLATFORM node:22-alpine AS build
# is exactly what made the v1.2.15 web image fail to build.
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm ci 2>/dev/null || npm install
# --ignore-scripts: the web image only needs `vite build`; the one heavy postinstall in this tree
# (@capacitor/assets -> sharp, a libvips download from GitHub) is for drawing app icons and has
# timed out on the shared runners — a lockfile-ignoring `npm install` fallback is no answer to that.
RUN npm ci --ignore-scripts
COPY api/coach/core/ /app/api/coach/core/
COPY frontend/ ./
RUN npm run build