Cicd Pipeline Setup

aj-geddes/useful-ai-prompts/skills/cicd-pipeline-setup

作者 aj-geddes3f5182cfd739無授權條款355 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 個月前更新

Design and implement CI/CD pipelines with GitHub Actions, GitLab CI, Jenkins, or CircleCI. Use for automated testing, building, and deployment workflows.

包含腳本DevOps & Cloud
AI 產生的概覽

設計並實作適用於 GitHub Actions、GitLab CI、Jenkins 或 CircleCI 的 CI/CD 流程。

功能
此技能協助建置自動化持續整合與部署流程,用於測試程式碼、建置產出物、執行安全檢查,並部署到多個環境。它提供 GitHub Actions、GitLab CI、Jenkins 與 CI/CD 指令碼的參考指南,以及一個流程範本和一個驗證指令碼。它產出用於自動化測試、建置與部署的流程設定與工作流程定義。
適用情境
適用於設定自動化程式碼測試與品質檢查、容器化應用程式建置、多環境部署、版本發佈管理,或自動化安全與效能測試。它適合希望減少建置與部署流程中人工介入的團隊。
執行需求
附帶可執行指令碼,包括 scripts/validate-pipeline.sh,以及一個流程範本。它面向 GitHub Actions、GitLab CI、Jenkins 或 CircleCI 等 CI/CD 平台,部署時需要存取相應的程式碼儲存庫與平台憑證。

CI/CD Pipeline Setup

Table of Contents

Overview

Build automated continuous integration and deployment pipelines that test code, build artifacts, run security checks, and deploy to multiple environments with minimal manual intervention.

When to Use

  • Automated code testing and quality checks
  • Containerized application builds
  • Multi-environment deployments
  • Release management and versioning
  • Automated security scanning
  • Performance testing integration
  • Artifact management and registry

Quick Start

Minimal working example:

yaml
# .github/workflows/deploy.ymlname: Build and Deploy
on:  push:    branches:      - main      - develop  pull_request:    branches:      - main  workflow_dispatch:
env:  REGISTRY: ghcr.io  IMAGE_NAME: ${{ github.repository }}
jobs:  test:    runs-on: ubuntu-latest    strategy:      matrix:        node-version: [18.x, 20.x]
    steps:// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
GitHub Actions Workflow [blocked]GitHub Actions Workflow
GitLab CI Pipeline [blocked]GitLab CI Pipeline
Jenkins Pipeline [blocked]Jenkins Pipeline
CI/CD Script [blocked]CI/CD Script

Best Practices

✅ DO

  • Fail fast with early validation
  • Run tests in parallel when possible
  • Use caching for dependencies
  • Implement proper secret management
  • Gate production deployments with approval
  • Monitor and alert on pipeline failures
  • Use consistent environment configuration
  • Implement infrastructure as code

❌ DON'T

  • Store credentials in pipeline configuration
  • Deploy without automated tests
  • Skip security scanning
  • Allow long-running pipelines
  • Mix staging and production pipelines
  • Ignore test failures
  • Deploy directly to main branch
  • Skip health checks after deployment

來源與署名

來源:aj-geddes/useful-ai-prompts位於skills/cicd-pipeline-setup提交3f5182c

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架