AGENT SKILL

deployment-pipeline-design

Use when architecting a multi-stage CI/CD pipeline with approval gates, SAST and DAST scans, environment promotion, canary rollout and automated rollback. Design-level; for concrete Dockerfile and health check patterns use deployment-patterns.

License 许可
MIT
所属仓库
monoes/monomind
最近更新
2026-11-14
Stars
★ 23
Forks
2

01 前言 Front Matter

name
deployment-pipeline-design
tags
[ "devops", "deploy", "architecture" ]
tools
[]
source
https://github.com/wshobson/agents
license
MIT
description
Use when architecting a multi-stage CI/CD pipeline with approval gates, SAST and DAST scans, environment promotion, canary rollout and automated rollback. Design-level; for concrete Dockerfile and health check patterns use deployment-patterns.
source_path
plugins/cicd-automation/skills/deployment-pipeline-design
source_commit
4236bb91f8395b0435f1d8b8baf9e8e4c69a8620

02 资源文件 3

03 SKILL.md 正文

Deployment Pipeline Design

Architecture patterns for multi-stage CI/CD pipelines with approval gates, deployment strategies, and environment promotion workflows.

Purpose

Design robust, secure deployment pipelines that balance speed with safety through proper stage organization, automated quality gates, and progressive delivery strategies. This skill covers both the structural design of pipeline architecture and the operational patterns for reliable production deployments.

Input / Output

What You Provide

  • Application type: Language/runtime, containerized or bare-metal, monolith or microservices
  • Deployment target: Kubernetes, ECS, VMs, serverless, or platform-as-a-service
  • Environment topology: Number of environments (dev/staging/prod), region layout, air-gap requirements
  • Rollout requirements: Acceptable downtime, rollback SLA, traffic splitting needs, canary vs blue-green preference
  • Gate constraints: Approval teams, required test coverage thresholds, compliance scans (SAST, DAST, SCA)
  • Monitoring stack: Prometheus, Datadog, CloudWatch, or other metrics sources used for automated promotion decisions

What This Skill Produces

  • Pipeline configuration: Stage definitions, job dependencies, parallelism, and caching strategy
  • Deployment strategy: Chosen rollout pattern with annotated configuration (canary weights, blue-green switchover, rolling parameters)
  • Health check setup: Shallow vs deep readiness probes, post-deployment smoke test scripts
  • Gate definitions: Automated metric thresholds and manual approval workflows
  • Rollback plan: Automated rollback triggers and manual runbook steps

When to Use

  • Design CI/CD architecture for a new service or platform migration
  • Implement deployment gates between environments
  • Configure multi-environment pipelines with mandatory security scanning
  • Establish progressive delivery with canary or blue-green strategies
  • Debug pipelines where stages succeed but production behavior is wrong
  • Reduce mean time to recovery by automating rollback on metric degradation

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Troubleshooting

Health check passes in pipeline but service is unhealthy in production

The pipeline health check is hitting a shallow /ping endpoint that returns 200 even when the database is unreachable. Use a deep readiness check that verifies actual dependencies (see Health Checks section above).

Canary deployment never promotes to 100%

Argo Rollouts requires a valid AnalysisTemplate to auto-promote. If the Prometheus query returns no data (e.g., metric name changed), the analysis stays inconclusive and promotion stalls. Add inconclusiveLimit so the rollout fails fast rather than hanging:

spec:
  metrics:
  - name: error-rate
    failureCondition: "result[0] > 0.05"
    inconclusiveLimit: 2   # fail after 2 inconclusive results, not hang indefinitely
    provider:
      prometheus:
        query: |
          sum(rate(http_requests_total{status=~"5.."}[2m]))
          / sum(rate(http_requests_total[2m]))

Staging deploy succeeds but production job never starts

Check that production environment protection rules are configured — a missing reviewer assignment means the approval gate waits indefinitely with no notification. In GitHub Actions, ensure Required reviewers is set to an existing user or team in Settings → Environments → production.

Docker layer cache busted on every run causing slow builds

If COPY . . appears before dependency installation, any source file change invalidates the dependency layer. Reorder to copy dependency manifests first:

# Good: dependencies cached separately from source code
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

Rollback leaves database migrations applied to old code

A service rollback without a migration rollback causes schema/code mismatch errors. Always make migrations backward-compatible (additive only) for at least one release cycle, and keep undo scripts versioned alongside the migration:

# migrations/V20240315__add_nullable_column.sql       (forward)
# migrations/V20240315__add_nullable_column.undo.sql  (backward)

Never run destructive migrations (DROP COLUMN, ALTER NOT NULL) until the old code version is fully retired from all environments.

Advanced Topics

For platform-specific pipeline configurations, multi-region promotion workflows, and advanced Argo Rollouts patterns, see:

  • references/advanced-strategies.md — Extended YAML examples, platform-specific configs (GitHub Actions, GitLab CI, Azure Pipelines), multi-region canary patterns, and database migration rollback strategies

Related Skills

  • github-actions-templates - For GitHub Actions implementation patterns and reusable workflows
  • gitlab-ci-patterns - For GitLab CI/CD pipeline implementation
  • secrets-management - For secrets handling in CI/CD pipelines

04 同仓库更多 Skills

monoes
monoes/monomind

isms-audit-expert

Use when planning or running an ISO 27001 ISMS audit: risk-based audit schedules, Annex A control assessment, Statement of Applicability and nonconformities. Auditor-side procedures, versus compliance-auditor, which is org role guidance across SOC 2, HIPAA and PCI-DSS.

★ 23
monoes
monoes/monomind

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.

★ 23
monoes
monoes/monomind

experiment-designer

Use when planning a product A/B or multivariate test: If/Then/Because hypotheses, primary and guardrail metrics, sample size and MDE, ICE prioritization. For logging and reproducing ML runs use experiment-tracker; for scientific study design use experimental-design.

★ 23
monoes
monoes/monomind

digest

Generate a daily or weekly digest of activity across all connected sources. Use when catching up after time away, starting the day and wanting a summary of mentions and action items, or reviewing a week's decisions and document updates grouped by project.

★ 23
monoes
monoes/monomind

design-critique

Get structured design feedback on usability, hierarchy, and consistency. Trigger with "review this design", "critique this mockup", "what do you think of this screen?", or when sharing a Figma link or screenshot for feedback at any stage from exploration to final polish.

★ 23
monoes
monoes/monomind

data-storytelling

Use when turning analytics into a narrative for executives, QBRs, investor decks or data reports: story arc, context and chart choices that drive a decision.

★ 23