← Zurück zu Desktop-App-Entwickler

Skill · Version 1.0.0

CI/CD und Release-Pipelines

Ordnet Prüfung und Auslieferung um unveränderliche Artefakte, koordinierte Zustandswechsel und Nachweise der aktiven Version.

cicd-release-engineering

Teammitglieder mit diesem Skill

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze dies für nachvollziehbare Artefakte und koordinierte Änderungen an Anwendung, Datenbank und Workern.

Wobei hilft er dir?

  • Ordnet fixierte Installation, Prüfungen, Tests und Build in zeitbegrenzte Pipelinephasen.
  • Verwendet dasselbe unveränderliche Artefakt und serialisiert Deployments pro Umgebung.
  • Verknüpft aktive Versionsnachweise mit Migrationen, Workerwechsel und Wiederherstellungsreihenfolge.

Das könntest du fragen

Plane eine Pipeline, die überlappende Deployments einreiht und den aktiven Commit sichtbar macht. Starte zwei Veröffentlichungen kurz nacheinander, wobei der ältere Build zuletzt endet. Er darf weder die neuere Revision überschreiben noch ein anderes Artefakt veröffentlichen.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

CI/CD & Release Engineering

Design pipelines so every commit goes through fast, deterministic verification, and every release promotes a single traced artifact through environments in a safe, repeatable order.

Pipeline Stage Architecture & Concurrency

Structure workflows into explicit stages with fail-fast ordering and concurrency protection:

  1. Fast Verification Stage (PR & Branch Push):
    • Run install (frozen lockfile) $\rightarrow$ lint + typecheck $\rightarrow$ unit/integration tests $\rightarrow$ build check.
    • Use CI concurrency groups:
      • On pull requests: cancel-in-progress: true keyed by workflow + PR/branch so superseded commits free runners immediately.
      • On deployments/releases: cancel-in-progress: false (queue or serialize per target environment) so an in-flight production rollout or migration is never killed mid-execution by a second merge!
  2. Build Once, Promote Everywhere:
    • Compile and package the release artifact once from the verified commit SHA, attach provenance metadata (git_sha, version, build_timestamp), and promote that exact immutable image digest (@sha256:...) or signed archive from staging to production—never rebuild from source per environment.
  3. Explicit Job Timeouts:
    • Set an explicit timeout-minutes on every CI job so hung network calls or deadlocked tests fail predictably instead of burning runner quota for 6 hours.

Safe Deployment Ordering: App, Migrations & Workers

Rolling out code that changes database schemas, queue payloads, or API contracts requires backward-compatible sequencing (Expand and Contract):

Step Action Why Order Matters
1. Pre-Deploy (Expand Schema) Apply additive, backward-compatible migrations (ADD COLUMN NULL, new table, CREATE INDEX CONCURRENTLY) Old running app instances and workers continue functioning without errors while the migration runs.
2. Roll Out New App & Workers Deploy new application instances and drain/restart queue workers once health/readiness checks pass New code starts writing to new columns/formats while still tolerating in-flight old queue jobs.
3. Post-Deploy Verification Run smoke checks against critical user/system paths and monitor error rate & latency Confirms the new version serves traffic cleanly before removing old instances or columns.
4. Contract (Later Release) Drop deprecated columns or old job handlers in a subsequent release after all old instances and queued payloads have drained Prevents column does not exist crashes during rolling deploys or rollbacks.

Release Versioning & Traceability

  • Expose the running build's version and commit_sha via a lightweight health/version endpoint or response header and inject it into telemetry (service.version) so any error in logs or monitoring maps immediately to the exact commit.
  • Never rely on a mutable tag like :latest as the sole identifier of a production release.

Enthaltene Dateien 1

  • SKILL.md