ci: stop creating pipelines that have no jobs to run
Pipeline 518 today was red with zero jobs - a push where no rule matched, which GitLab still turns into a pipeline and then marks failed. The standstill check reported it correctly, and it was the only finding standing between the scheduled checks and green. Acknowledging it would have been the wrong move twice over: the entry would name one pipeline id, so the next empty pipeline files a fresh finding, and the underlying behaviour - red without a fault - is exactly what management #0104 is about. Rules that prevent the empty pipeline remove the class instead. schedule comes first deliberately. The daily canonization changes no paths, so a changes-based rule alone would drop it.
This commit is contained in:
@@ -3,6 +3,28 @@
|
||||
# weiterhin selbststaendig aus dem Gitea-Mirror. Repo-Topologie: git.lab ist
|
||||
# kanonisch, rohana/Gitea ist Push-Mirror und Flux-Quelle.
|
||||
|
||||
# Ohne workflow-Block legt GitLab auch dann eine Pipeline an, wenn KEIN Job auf sie
|
||||
# passt - und fuehrt sie als "failed". Das ist rot ohne Fehler, und rot ohne Fehler
|
||||
# gewoehnt einem das Hinsehen ab (management #0104). Real passiert am 2026-08-19,
|
||||
# Pipeline 518. Diese Regeln verhindern die leere Pipeline, statt sie hinterher zu
|
||||
# quittieren.
|
||||
#
|
||||
# Reihenfolge zaehlt: schedule zuerst, sonst faellt die taegliche Kanonisierung mit
|
||||
# heraus - sie aendert keine Pfade und wuerde von der changes-Regel nie erfasst.
|
||||
.pfade_mit_pipeline: &pfade_mit_pipeline
|
||||
- apps/**/*
|
||||
- clusters/**/*
|
||||
- .gitlab-ci.yml
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: $CI_PIPELINE_SOURCE == "web"
|
||||
- if: $CI_PIPELINE_SOURCE == "api"
|
||||
- if: $CI_COMMIT_BRANCH == "main"
|
||||
changes: *pfade_mit_pipeline
|
||||
- when: never
|
||||
|
||||
verify:
|
||||
image: alpine:3.20
|
||||
rules:
|
||||
|
||||
Reference in New Issue
Block a user