跳到正文
Skillpedia
部署与云(DevOps)48k · #4373

deployment-pipeline-design

它能做什么

这个工具可以帮你规划新的软件代码如何交付到生产环境。它会建议相应的步骤和方法,确保交付既安全又高效。

适用场景

  • ✓规划如何发布应用的新版本时。
  • ✓搭建自动测试和自动审批新版本的系统时。
  • ✓决定如何从旧版本平滑过渡到新版本、不影响用户使用时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/deployment-pipeline-design/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/deployment-pipeline-design/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想规划一下 Web 应用新功能的交付流程。应该包含哪些步骤?怎样才能保证安全上线?”

每周 5 个新技能,1 分钟读完。

工作原理

它会给出一系列步骤,比如编译代码、测试代码、部署到测试环境,最后发布给用户。同时,它还会提供不同的发布策略供你选择,比如逐步发布或一次性全部发布。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Deployment Pipeline Design

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

Do not use this skill when

  • The task is unrelated to deployment pipeline design
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

Purpose

Design robust, secure deployment pipelines that balance speed with safety through proper stage organization and approval workflows.

Use this skill when

  • Design CI/CD architecture
  • Implement deployment gates
  • Configure multi-environment pipelines
  • Establish deployment best practices
  • Implement progressive delivery

Pipeline Stages

Standard Pipeline Flow

┌─────────┐   ┌──────┐   ┌─────────┐   ┌────────┐   ┌──────────┐
│  Build  │ → │ Test │ → │ Staging │ → │ Approve│ → │Production│
└─────────┘   └──────┘   └─────────┘   └────────┘   └──────────┘

Detailed Stage Breakdown

  1. Source - Code checkout
  2. Build - Compile, package, containerize
  3. Test - Unit, integration, security scans
  4. Staging Deploy - Deploy to staging environment
  5. Integration Tests - E2E, smoke tests
  6. Approval Gate - Manual approval required
  7. Production Deploy - Canary, blue-green, rolling
  8. Verification - Health checks, monitoring
  9. Rollback - Automated rollback on failure

Approval Gate Patterns

Pattern 1: Manual Approval

# GitHub Actions
production-deploy:
  needs: staging-deploy
  environment:
    name: production
    url: https://app.example.com
  runs-on: ubuntu-latest
  steps:
    - name: Deploy to production
      run: |
        # Deployment commands

Pattern 2: Delayed Deployment

# GitLab CI
deploy:production:
  stage: deploy
  script:
    - deploy.sh production
  environment:
    name: production
  when: delayed
  start_in: 30 minutes
  only:
    - main

Pattern 3: Multi-Approver

Configure the platform's actual protected-environment approval policy and verify who may approve or bypass it. For Azure, bind manual validation to the installed task version and its supported agentless job rather than placing it in an arbitrary deployment hook. Record required approvers and evidence; notifications alone are not approval.

Deployment Strategies

1. Rolling Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  replicas: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 2
      maxUnavailable: 1

Characteristics:

  • Gradual rollout
  • Availability depends on readiness, capacity and compatible changes
  • Easy rollback
  • Best for most applications

2. Blue-Green Deployment

# Blue (current)
kubectl apply -f blue-deployment.yaml
kubectl patch service my-app --type merge -p '{"spec":{"selector":{"app":"my-app","version":"blue"}}}'

# Green (new)
kubectl apply -f green-deployment.yaml
# Test green environment
kubectl patch service my-app --type merge -p '{"spec":{"selector":{"app":"my-app","version":"green"}}}'

# Rollback if needed
kubectl patch service my-app --type merge -p '{"spec":{"selector":{"app":"my-app","version":"blue"}}}'

Characteristics:

  • Instant switchover
  • Easy rollback
  • Doubles infrastructure cost temporarily
  • Good for high-risk deployments

3. Canary Deployment

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-app
spec:
  replicas: 10
  strategy:
    canary:
      steps:
      - setWeight: 10
      - pause: {duration: 5m}
      - setWeight: 25
      - pause: {duration: 5m}
      - setWeight: 50
      - pause: {duration: 5m}
      - setWeight: 100

Characteristics:

  • Gradual traffic shift
  • Risk mitigation
  • Real user testing
  • Requires service mesh or similar

4. Feature Flags

from flagsmith import Flagsmith

flagsmith = Flagsmith(environment_key="API_KEY")

if flagsmith.has_feature("new_checkout_flow"):
    # New code path
    process_checkout_v2()
else:
    # Existing code path
    process_checkout_v1()

Characteristics:

  • Deploy without releasing
  • A/B testing
  • Instant rollback
  • Granular control

Pipeline Orchestration

Multi-stage implementation contract

…

常见问题

什么是“CI/CD 流水线”?

这是一组自动化步骤,能帮助更快速、更可靠地交付新代码。CI 指持续集成(频繁地把代码整合在一起),CD 指持续交付或持续部署(频繁地交付或部署代码)。

什么是“审批关卡”?

审批关卡是交付流程中的检查点,需要人工或系统批准后才能继续推进。这样可以确保只有经过测试并获得批准的代码,才会进入下一阶段,比如生产环境。

文中提到了哪些部署策略?

包括“滚动部署”(逐步更新)、“蓝绿部署”(在两个版本之间瞬间切换)、“金丝雀部署”(先向一小部分用户发布)以及“功能开关”(无需重新部署,即可开启或关闭某项功能)。

详情

作者的原始描述

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

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4373
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能