Files
management/.gitlab-ci.yml
T
Thore Cimbal cc3c43052b ci: close the same empty-pipeline gap here before it opens
gitops produced a red pipeline with no jobs today because nothing guarded pipeline
creation. This repo has the same shape: its three jobs cover schedule, web and push,
so an API-triggered pipeline matches none of them and would be created empty and
marked failed.

Nobody triggers this repo by API today, which is why it has not happened yet - not a
reason to leave it. One block, and the class is gone in both places.
2026-08-19 12:00:00 +00:00

91 lines
3.5 KiB
YAML

# CI des management-Repos. Enthaelt bewusst nur die Stillstandspruefung — hier
# liegt Dokumentation, es gibt nichts zu bauen.
#
# Die Pruefung sucht Dinge, die leise aufgehoert haben zu funktionieren. Anlass ist
# die Retro vom 2026-08-09: sechs solcher Faelle in neun Tagen, keiner davon durch
# eine Ueberwachung gefunden.
# Ohne workflow-Block legt GitLab auch dann eine Pipeline an, wenn KEIN Job auf sie
# passt, und fuehrt sie als "failed" - rot ohne Fehler, genau das, wogegen #0104
# angeht. Die drei Jobs unten decken schedule, web und push ab; ein API-Trigger
# traefe keinen davon. Im gitops-Repo ist dieser Fall am 2026-08-19 real eingetreten
# (Pipeline 518), hier wird er vorbeugend ausgeschlossen.
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "push"
- when: never
stages:
- pruefen
# Nur geplant und von Hand. Bei jedem Doku-Commit zu laufen brächte nichts —
# die Pruefung sieht auf den Zustand des Verbunds, nicht auf diesen Commit.
stillstandspruefung:
stage: pruefen
image: python:3.12-alpine
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "web"
variables:
LAB_CA: "$CI_PROJECT_DIR/ci/lab-ca-chain.crt"
before_script:
- apk add --no-cache curl ca-certificates >/dev/null
script:
# Ohne Token laeuft nichts — und das soll laut auffallen. Eine Pruefung, die
# sich still selbst ueberspringt, waere genau der Fehler, den sie sucht.
- |
if [ -z "$GITLAB_TOKEN" ]; then
echo "GITLAB_TOKEN fehlt (Gruppen-Token mit read_api)."
echo "Ohne Lesezugriff kann nichts geprueft werden - siehe management#31."
exit 1
fi
- python3 scripts/stillstandspruefung.py
# Befunde sind kein Betriebsausfall, aber sie sollen sichtbar bleiben. Die rote
# Pipeline ist bei uns die Alarmanlage (gitops/CLAUDE.md, TURN-Rotation).
allow_failure: false
# Offline-Gate bei jedem Push: Artefakte gegen schema.yaml, STATUS.md
# aktuell, Framework-Dateien unveraendert (Design 2026-08-11, Slice 1).
# Braucht nur den Baum - bewusst ohne Token und ohne Netz.
validate:
stage: pruefen
image: python:3.12-alpine
rules:
- if: $CI_PIPELINE_SOURCE == "push"
before_script:
- apk add --no-cache git >/dev/null # pruefe_prosa.py braucht git cat-file
- pip install --quiet pyyaml
script:
- python3 scripts/validate.py
- python3 scripts/gen_status.py --check
- python3 scripts/pruefe_upstream_drift.py
- python3 scripts/pruefe_prosa.py
allow_failure: false
# Verbund-Prüfung (ADR-0012/0013): Gruppenliste vs. docs/components/,
# Pointer-Praesenz, Meilenstein-/Prioritaetspflicht, Issue-Drift,
# Git-Hygiene. Gleiche Regeln wie die Stillstandspruefung: geplant/von
# Hand, rot = Alarm, Abbruch ohne Token.
gruppenpruefung:
stage: pruefen
image: python:3.12-alpine
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "web"
variables:
# gruppenpruefung.py spricht die git.lab-API per urllib an; git.lab läuft
# über die private aXionLabs-CA. Python honoriert SSL_CERT_FILE im Default-Context.
SSL_CERT_FILE: "$CI_PROJECT_DIR/ci/lab-ca-chain.crt"
before_script:
- apk add --no-cache git >/dev/null # gruppenpruefung.py ruft 'git log' auf
script:
- |
if [ -z "$GITLAB_TOKEN" ]; then
echo "GITLAB_TOKEN fehlt (Gruppen-Token mit read_api)."
exit 1
fi
- python3 scripts/gruppenpruefung.py
allow_failure: false