← ClaudeAtlas

validating-ci-pipelines-locallylisted

Executes GitLab CI/CD pipelines locally with the same image, env vars, and service containers as the real runner, so pipeline failures surface before the push. Covers pipeline discovery, per-job execution via gitlab-runner exec, service-container orchestration, env injection without secrets, and a job-by-job verdict report. Also covers the GitHub Actions equivalent via act. Activates on "Pipeline lokal testen", "warum failt die CI", .gitlab-ci.yml changes, or before a push that must not break CI. NOT for the local check script (use running-check-script). NOT for authoring CI configs (use the devops agent).
lenneTech/claude-code · ★ 0 · DevOps & Infrastructure · score 75
Install: claude install-skill lenneTech/claude-code
# Validating CI Pipelines Locally This skill is the **single source of truth** for reproducing a GitLab (or GitHub Actions) pipeline locally. The goal is to catch pipeline failures **before** pushing to the remote — using the same Docker image, the same env vars, and the same service containers as the real runner. > **Goal:** Run every job from `.gitlab-ci.yml` (or `.github/workflows/*.yml`) on the local machine with results that mirror what the remote runner would produce. ## When to Use This Skill | Caller | Phase | Trigger | |--------|-------|---------| | `/lt-dev:production-ready` | Phase 7 | Hard release gate — must pass before sign-off | | `lt-dev:production-readiness-orchestrator` | Phase 7 | Owns the per-job execution + retry loop | | Manual user invocation | Pre-push | Reproducing a CI failure locally without the round-trip | ## Step 1 — Detect the pipeline format The repo may use GitLab, GitHub Actions, or both. Detect first: ```bash # GitLab test -f .gitlab-ci.yml && echo "gitlab" || true ls .gitlab-ci/*.yml 2>/dev/null # included files # GitHub Actions ls .github/workflows/*.yml 2>/dev/null ``` If multiple formats exist, the consumer asks the user which to validate. If `--ci=<gitlab|github|both>` was passed, honour it. ## Step 2 — Ensure the runner toolchain is installed | Format | Tool | Install (macOS) | Install (Linux) | Image-only fallback | |--------|------|-----------------|------------------|----------------------| | GitLab | `gitlab-runner` |