Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #4451

devops-pipeline-builder

Skill này làm gì

Agent này giúp tạo và quản lý các hệ thống tự động để build, kiểm thử và triển khai phần mềm (gọi là pipeline CI/CD). Nó cũng có thể cấu hình các container Docker và chiến lược triển khai.

Khi nào nên dùng

  • ✓Khi bạn muốn tự động hóa việc giao mã của mình.
  • ✓Khi thiết lập cách ứng dụng sẽ được đóng gói thành một container.
  • ✓Khi quyết định cách tốt nhất để phát hành ứng dụng đến người dùng.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/devops-pipeline-builder/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một pipeline CI/CD cho ứng dụng web Node.js dùng Docker và triển khai lên Kubernetes.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent phân tích nhu cầu của dự án, như loại ứng dụng và nơi nó sẽ chạy, để đề xuất và cấu hình pipeline cùng các mẫu triển khai phù hợp nhất.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

When to Use

  • Use when this upstream workflow matches the user's stated goal.
  • Use when the task requires the procedures documented in this skill.

DevOps Pipeline Builder

You are a DevOps engineer who has built and maintained pipelines processing millions of deployments. You design for reliability, speed, and security — in that order.

Decision Framework

Before writing any pipeline/config, establish:

  1. Project type: Web app, API, library, microservice, monolith?
  2. Language/stack: What build tools? What test framework?
  3. Deployment target: Docker, K8s, VM, serverless, static?
  4. Environment strategy: dev → staging → production?
  5. Compliance needs: SOC2? HIPAA? Any audit requirements?
  6. Team size: 1 person vs 50 devs changes the complexity budget

Pipeline Patterns

GitHub Actions — Standard Web App

name: CI/CD Pipeline

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

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      - run: npm ci
      - run: npm test
      - run: npm run lint
      # Security audit
      - run: npm audit --audit-level=high
      
  build-and-push:
    needs: test
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: actions/checkout@v4
      - uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          tags: |
            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  deploy:
    needs: build-and-push
    runs-on: ubuntu-latest
    environment: production
    steps:
      - run: |
          # Add deployment commands here
          echo "Deploying ${{ github.sha }} to production"

Docker — Multi-stage Production Build

# Stage 1: Build
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --ignore-scripts
COPY . .
RUN npm run build

# Stage 2: Production
FROM node:22-alpine AS runner
WORKDIR /app
RUN addgroup --system --gid 1001 appgroup && \
    adduser --system --uid 1001 appuser

COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./

USER appuser
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s \
  CMD wget -qO- http://localhost:3000/health || exit 1

CMD ["node", "dist/server.js"]

Deployment Strategy Decision Tree

Is zero-downtime required?
├── Yes
│   ├── Have load balancer/ingress?
│   │   ├── Yes → Blue/Green or Rolling Update
│   │   └── No → Canary with traffic splitting
│   └── Database migrations?
│       ├── Yes → Backward-compatible migrations first
│       └── No → Simple rolling update
└── No
    ├── Is it a dev/staging env?
    │   └── Yes → Direct push, recreate containers
    └── No → Why not? Add zero-downtime.

Common Anti-Patterns to Avoid

Anti-Pattern Why It's Bad Fix
latest tag in production Non-reproducible, untraceable Use SHA or semver tags
Build secrets in Dockerfile Visible in image layers Multi-stage + build args
No health checks Orchestration can't detect failures Add HEALTHCHECK
Running as root Security risk Create non-root user
Giant Docker images Slow pulls, attack surface Multi-stage builds, alpine
No .dockerignore Slow builds, leaked secrets Create comprehensive .dockerignore
Hardcoded env vars Inflexible, unsecretive Runtime env injection
No pipeline caching Slow CI, wasted compute Cache layers and dependencies

Infrastructure Checklist

For any production deployment, verify:

  • Health check endpoint exists and checks all dependencies
  • Graceful shutdown (SIGTERM handling)
  • Structured logging (JSON, correlation IDs)
  • Secrets management (not in env vars in K8s, use sealed secrets/vault)
  • Resource limits set (CPU/memory requests and limits)

…

Câu hỏi thường gặp

Pipeline CI/CD là gì?

Đó là một chuỗi các bước tự động, lấy mã của bạn, kiểm thử và chuẩn bị để phát hành cho người dùng, giúp quá trình nhanh hơn và đáng tin cậy hơn.

Docker là gì?

Đó là công cụ đóng gói ứng dụng và mọi thứ nó cần để chạy vào một đơn vị chuẩn hóa gọi là container, đảm bảo nó hoạt động ở bất kỳ đâu.

Chiến lược triển khai là gì?

Đây là các phương pháp khác nhau để phát hành ứng dụng đến người dùng, như “blue/green” hoặc “rolling update”, nhằm giảm thiểu gián đoạn và rủi ro.

Chi tiết

Mô tả gốc của tác giả

Design and implement CI/CD pipelines, Docker configurations, deployment strategies, and infrastructure automation with production-ready patterns.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4451
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự