Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

deployment-pipeline-design部署管道设计

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

220

周安装

9

GitHub Stars

265

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:deployment-pipeline-design(部署管道设计)
来源仓库:https://github.com/rsmdt/the-startup
仓库路径:skills/deployment-pipeline-design
安装命令:
npx skills add https://github.com/rsmdt/the-startup --skill deployment-pipeline-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rsmdt/the-startup --skill deployment-pipeline-design

简介

deployment-pipeline-design 用于辅助云资源、部署、容器、基础设施和运维自动化任务。

  • 适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。
  • 使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作。
  • 涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。
  • 当前底部简介为空,需参考原始 SKILL.md 获取完整使用指南。

SKILL.md

CI/CD Patterns

A comprehensive skill for designing and implementing continuous integration and deployment pipelines. Covers pipeline architecture, deployment strategies, quality gates, and platform-specific patterns for GitHub Actions and GitLab CI.

When to Use

  • Designing new CI/CD pipelines from scratch
  • Implementing deployment strategies (blue-green, canary, rolling)
  • Setting up quality gates and approval workflows
  • Configuring GitHub Actions or GitLab CI pipelines
  • Implementing automated rollback mechanisms
  • Creating multi-environment deployment workflows
  • Integrating security scanning into pipelines

Pipeline Architecture

Pipeline Stages

A well-designed pipeline follows these stages in order:

Build -> Test -> Analyze -> Package -> Deploy -> Verify

Stage Breakdown:

StagePurposeFailure Action
BuildCompile code, resolve dependenciesFail fast, notify developer
TestUnit tests, integration testsBlock deployment
AnalyzeSAST, linting, code coverageBlock or warn based on threshold
PackageCreate artifacts, container imagesFail fast
DeployPush to environmentRollback on failure
VerifySmoke tests, health checksTrigger rollback

Pipeline Design Principles

  1. Fail Fast: Run quick checks (lint, unit tests) before slow ones
  2. Parallel Execution: Run independent jobs concurrently
  3. Artifact Caching: Cache dependencies between runs
  4. Immutable Artifacts: Build once, deploy everywhere
  5. Environment Parity: Dev, staging, and prod should be identical

Deployment Strategies

Blue-Green Deployment

Two identical production environments where traffic switches instantly.

                    Load Balancer
                         |
            +------------+------------+
            |                         |
        [Blue v1.0]              [Green v1.1]
         (active)                 (standby)

When to Use:

  • Zero-downtime requirements
  • Need instant rollback capability
  • Sufficient infrastructure budget for duplicate environments

Implementation Steps:

  1. Deploy new version to inactive environment (Green)
  2. Run smoke tests against Green
  3. Switch load balancer to Green
  4. Monitor for issues
  5. Keep Blue running for quick rollback
  6. After confidence period, Blue becomes next deployment target

Rollback: Switch load balancer back to Blue (seconds)

Canary Deployment

Gradually shift traffic from old version to new version.

Traffic Distribution Over Time:

T0:  [====== v1.0 100% ======]
T1:  [=== v1.0 95% ===][v1.1 5%]
T2:  [== v1.0 75% ==][= v1.1 25% =]
T3:  [= v1.0 50% =][== v1.1 50% ==]
T4:  [====== v1.1 100% ======]

When to Use:

  • High-risk deployments
  • Need to validate with real traffic
  • Want gradual rollout with monitoring

Traffic Progression (Example):

  1. 5% for 15 minutes - validate basic functionality
  2. 25% for 30 minutes - monitor error rates
  3. 50% for 1 hour - check performance metrics
  4. 100% - full rollout

Rollback Triggers:

  • Error rate exceeds baseline + threshold
  • Latency exceeds acceptable limits
  • Health check failures

Rolling Deployment

Replace instances incrementally, one batch at a time.

Instance Pool (5 instances):

T0: [v1.0] [v1.0] [v1.0] [v1.0] [v1.0]
T1: [v1.1] [v1.0] [v1.0] [v1.0] [v1.0]
T2: [v1.1] [v1.1] [v1.0] [v1.0] [v1.0]
T3: [v1.1] [v1.1] [v1.1] [v1.0] [v1.0]
T4: [v1.1] [v1.1] [v1.1] [v1.1] [v1.0]
T5: [v1.1] [v1.1] [v1.1] [v1.1] [v1.1]

When to Use:

  • Limited infrastructure resources
  • Can tolerate mixed versions during deployment
  • Stateless applications

Configuration Parameters:

  • maxUnavailable: How many instances can be down simultaneously
  • maxSurge: How many extra instances during deployment
  • minReadySeconds: Wait time before considering instance healthy

Feature Flags

Decouple deployment from release - deploy code without activating features.

Code deployed with feature flag:

if (featureFlags.isEnabled('new-checkout', user)) {
  return newCheckoutFlow(cart);
} else {
  return legacyCheckoutFlow(cart);
}

When to Use:

  • Long-running feature development
  • A/B testing requirements
  • Gradual feature rollouts
  • Kill switch for problematic features

Rollback: Disable flag (no deployment required)

Quality Gates

Required Gates

Every pipeline should include these gates:

GateThresholdBlock Deploy?
Unit Tests100% passYes
Integration Tests100% passYes
Code Coverage>= 80%Yes
Security Scan (Critical)0 findingsYes
Security Scan (High)0 new findingsConfigurable
Dependency Vulnerabilities0 criticalYes

Manual Approval Gates

Use for production deployments:

# Conceptual flow
stages:
  - test
  - deploy-staging
  - approval        # Manual gate
  - deploy-prod
  - verify

Approval Requirements:

  • At least 2 approvers for production
  • No self-approval allowed
  • Time-boxed approval windows
  • Audit trail of approvals

GitHub Actions Patterns

Basic Pipeline Structure

name: CI/CD Pipeline

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npm run build
      - uses: actions/upload-artifact@v4
        with:
          name: build
          path: dist/

  test:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/download-artifact@v4
        with:
          name: build
          path: dist/
      - run: npm ci
      - run: npm test

  deploy-staging:
    needs: test
    if: github.ref == 'refs/heads/main'
    environment: staging
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: build
      - run: ./deploy.sh staging

  deploy-prod:
    needs: deploy-staging
    if: github.ref == 'refs/heads/main'
    environment: production
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          name: build
      - run: ./deploy.sh production

Matrix Builds

Run tests across multiple configurations:

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        node: [18, 20, 22]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}
      - run: npm ci
      - run: npm test

Reusable Workflows

Create reusable workflow in .github/workflows/deploy-reusable.yml:

name: Reusable Deploy

on:
  workflow_call:
    inputs:
      environment:
        required: true
        type: string
    secrets:
      DEPLOY_KEY:
        required: true

jobs:
  deploy:
    environment: ${{ inputs.environment }}
    runs-on: ubuntu-latest
    steps:
      - run: ./deploy.sh ${{ inputs.environment }}
        env:
          DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}

Call from another workflow:

jobs:
  deploy-staging:
    uses: ./.github/workflows/deploy-reusable.yml
    with:
      environment: staging
    secrets:
      DEPLOY_KEY: ${{ secrets.STAGING_DEPLOY_KEY }}

Environment Protection Rules

Configure in repository settings:

  • Required reviewers for production
  • Wait timer (e.g., 15 minutes before prod deploy)
  • Restrict to specific branches
  • Required status checks

GitLab CI Patterns

Basic Pipeline Structure

stages:
  - build
  - test
  - deploy

variables:
  NODE_VERSION: "20"

default:
  image: node:${NODE_VERSION}
  cache:
    paths:
      - node_modules/

build:
  stage: build
  script:
    - npm ci
    - npm run build
  artifacts:
    paths:
      - dist/
    expire_in: 1 hour

test:unit:
  stage: test
  script:
    - npm ci
    - npm run test:unit
  coverage: '/Coverage: \d+\.\d+%/'

test:integration:
  stage: test
  services:
    - postgres:15
  variables:
    POSTGRES_DB: test
    POSTGRES_USER: test
    POSTGRES_PASSWORD: test
  script:
    - npm ci
    - npm run test:integration

deploy:staging:
  stage: deploy
  environment:
    name: staging
    url: https://staging.example.com
  script:
    - ./deploy.sh staging
  only:
    - main

deploy:production:
  stage: deploy
  environment:
    name: production
    url: https://example.com
  script:
    - ./deploy.sh production
  when: manual
  only:
    - main

Pipeline Rules

deploy:production:
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: manual
    - if: $CI_COMMIT_TAG
      when: on_success
    - when: never

Include Templates

include:
  - template: Security/SAST.gitlab-ci.yml
  - template: Security/Dependency-Scanning.gitlab-ci.yml
  - local: .gitlab/ci/deploy.yml
  - project: 'devops/ci-templates'
    ref: main
    file: '/templates/docker-build.yml'

Dynamic Environments

deploy:review:
  stage: deploy
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    url: https://$CI_COMMIT_REF_SLUG.review.example.com
    on_stop: stop:review
  script:
    - ./deploy.sh review
  only:
    - merge_requests

stop:review:
  stage: deploy
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    action: stop
  script:
    - ./teardown.sh review
  when: manual
  only:
    - merge_requests

Rollback Mechanisms

Automated Rollback Triggers

# Conceptual rollback configuration
rollback:
  triggers:
    - metric: error_rate
      threshold: 5%
      window: 5m
    - metric: latency_p99
      threshold: 2000ms
      window: 5m
    - metric: health_check_failures
      threshold: 3
      window: 1m
  action:
    type: previous_version
    notify:
      - slack: #deployments
      - pagerduty: on-call

Database Migration Rollback

  1. Forward-only migrations (preferred):

- Never use destructive operations (DROP, DELETE) - Add new columns as nullable - Use feature flags to switch behavior - Clean up old columns in later release

  1. Rollback migrations:

- Every migration must have a corresponding rollback - Test rollbacks in staging before production - Keep rollback window defined (e.g., 24 hours)

Artifact-Based Rollback

rollback:production:
  stage: deploy
  environment:
    name: production
  script:
    - PREVIOUS_VERSION=$(get-previous-version.sh)
    - ./deploy.sh production $PREVIOUS_VERSION
  when: manual
  only:
    - main

Security Integration

SAST/DAST Integration

security:sast:
  stage: analyze
  image: security-scanner:latest
  script:
    - sast-scan --format sarif --output sast-results.sarif
  artifacts:
    reports:
      sast: sast-results.sarif

security:dependency:
  stage: analyze
  script:
    - npm audit --audit-level=high
    - trivy fs --security-checks vuln .

Secret Scanning

  • Never commit secrets to repository
  • Use environment secrets or vault integration
  • Scan for exposed secrets in pre-commit hooks
  • Rotate secrets immediately if exposed

Best Practices

Pipeline Design

  • Keep pipelines under 15 minutes for main branch
  • Use caching aggressively for dependencies
  • Run expensive tests in parallel
  • Fail fast with quick checks first
  • Use artifacts to avoid rebuilding

Deployment Safety

  • Always have a rollback plan
  • Deploy to staging before production
  • Use feature flags for risky changes
  • Monitor deployments in real-time
  • Document deployment procedures

Quality Assurance

  • Enforce code coverage thresholds
  • Block deployments on security findings
  • Require peer approval for production
  • Maintain environment parity
  • Test rollback procedures regularly

Observability

  • Log all deployment events
  • Track deployment frequency and lead time
  • Monitor change failure rate
  • Measure mean time to recovery
  • Alert on deployment failures

References

  • templates/pipeline-template.md - Complete pipeline template with all stages

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.35%
按下载量换算19

windsurf

24.85%
按下载量换算18

OpenCode

16.01%
按下载量换算11

Codex

11.14%
按下载量换算8

Gemini CLI

6.95%
按下载量换算5

trae

3.11%
按下载量换算2

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills