Nw Cicd And Deploymentのロゴ

Nw Cicd And Deployment

組織
nWave-ai
nw-cicd-and-deployment

CI/CDパイプラインの設計手法、デプロイ戦略、GitHub Actionsのパターン、ブランチ/リリース戦略を解説します。パイプラインやデプロイのワークフローを設計するときに読み込みます。

Add to TypingMind

概要

公開者nWave-ai
リポジトリnWave
スキル名nw-cicd-and-deployment
スター
616
フォーク
65
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    nWave-aiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Nw Cicd And Deployment」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-cicd-and-deployment
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nWave-ai/nWave.git /tmp/nWave
mkdir -p .claude/skills
cp -r /tmp/nWave/nWave/skills/nw-cicd-and-deployment .claude/skills/nw-cicd-and-deployment
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでNw Cicd And Deploymentを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にNw Cicd And Deploymentを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Nw Cicd And Deploymentは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

CI/CD Pipeline Design and Deployment Strategies

Local Quality Gates

Catch issues at the developer's machine before they reach CI. Local gates mirror the remote commit stage for fast feedback (seconds vs minutes).

Gate Taxonomy

GateTriggerChecksTools
Pre-commitgit commitFormatting, linting, unit tests, secrets scanpre-commit, husky, lefthook
Pre-pushgit pushIntegration tests, acceptance tests, coverage thresholdpre-commit (push stage), git hooks
Local CIManualFull pipeline locallyact (GitHub Actions), gitlab-runner exec

Design Principles

  • Mirror, not duplicate: local gates run the same checks as the remote commit stage, not additional ones. Keeps developer experience consistent with CI.
  • Fast by default: pre-commit gates target < 30 seconds. Move slow checks (integration, acceptance) to pre-push.
  • Escapable with audit trail: allow --no-verify for emergencies but log skips. CI remains the authoritative gate.
  • Framework selection: prefer pre-commit (Python ecosystem) or lefthook (polyglot, fast parallel execution) over raw git hooks. Husky for JS/TS-heavy projects.

Hook Stage Assignment

pre-commit (< 30s):     formatting | linting | unit tests (fast subset) | secrets scan
pre-push   (< 5 min):   full unit suite | integration tests | coverage check | type checking

Pipeline Stages

Commit Stage (target: < 10 minutes)

Compile/build | Run unit tests (fast, isolated) | Static code analysis (linting, formatting) | Security scanning (SAST, secrets detection) | Generate build artifacts. Quality gates: build success | 100% unit test pass rate | coverage threshold (e.g., > 80%) | no critical vulnerabilities | no secrets in code.

Acceptance Stage (target: < 30 minutes)

Deploy to test environment | Run acceptance/integration/contract tests | Security scanning (DAST). Quality gates: 100% acceptance/integration pass rate | no high/critical security findings | API contracts validated.

Capacity Stage (target: < 60 minutes, can run parallel)

Performance, load, and stress testing | Chaos engineering experiments. Quality gates: performance within SLO thresholds | load test pass (expected traffic + margin) | resilience under failure.

Production Stage

Progressive deployment (canary/blue-green) | Health checks and smoke tests | SLO monitoring during rollout | Automatic rollback on degradation. Quality gates: health checks pass | SLOs maintained | no error rate increase | latency within bounds.

Quality Gate Classification

Every quality gate has a category (where it runs), a type (what happens on failure), and a scope (what it protects).

Gate Taxonomy

CategoryStageTypeExamples
LocalPre-commit, pre-pushBlocking (developer)Format, lint, unit tests, secrets scan
PRPull requestBlocking (merge)Status checks, review approvals, coverage diff
CICommit stageBlocking (pipeline)Build, unit tests, SAST, coverage threshold
CIAcceptance stageBlocking (pipeline)Integration, acceptance, contract tests, DAST
DeployEnvironment promotionBlocking (approval)Manual approval, change advisory board
DeployCanary/progressiveAutomatic (rollback)Error rate, latency, SLO breach
ProductionPost-deployAdvisory (monitoring)Smoke tests, SLO monitoring window, business metrics

Gate Types

  • Blocking: pipeline halts on failure. Merge/deploy/promotion is prevented until resolved.
  • Automatic (rollback): no human intervention -- system rolls back on threshold breach. Requires pre-defined thresholds and rollback automation.
  • Advisory: failure is reported but does not block. Used for post-deploy monitoring where rollback is a separate decision.

Design Checklist

When designing quality gates for a pipeline, verify:

  1. Every remote CI gate has a local equivalent (pre-commit or pre-push)
  2. PR gates include both automated checks (status checks) and human review (approvals)
  3. Deployment gates distinguish blocking (promotion) from automatic (canary rollback)
  4. Post-deploy gates have clear escalation paths (advisory -> manual rollback decision)
  5. Gate thresholds are documented and versioned (not hardcoded in pipeline YAML)

GitHub Actions Patterns

Workflow Structure

Triggers: push to main/develop | pull_request | release tags | manual workflow_dispatch. Jobs flow: build -> security -> deploy_staging -> deploy_production. Each with appropriate needs dependencies and environment gates.

Quality Gate Pattern

yaml
- name: Quality Gate
  run: |
    COVERAGE=$(jq '.totals.percent_covered' coverage.json)
    if (( $(echo "$COVERAGE < 80" | bc -l) )); then
      echo "Coverage $COVERAGE% is below 80% threshold"
      exit 1
    fi

Caching Pattern

yaml
- uses: actions/cache@v4
  with:
    path: ~/.cache/pip
    key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
    restore-keys: |
      ${{ runner.os }}-pip-

Matrix Testing Pattern

yaml
strategy:
  matrix:
    python-version: ['3.10', '3.11', '3.12']
    os: [ubuntu-latest, macos-latest]

Deployment Strategies

Rolling Deployment

Gradual replacement of instances. Kubernetes config: type: RollingUpdate, maxSurge: 25%, maxUnavailable: 0.

  • Pros: zero downtime | simple | efficient resources
  • Cons: slow rollback | mixed versions during deployment
  • Use when: stateless services | no breaking API changes | low-risk changes

Blue-Green Deployment

Two identical environments, instant switch: Blue (current) serves traffic -> Deploy new to Green -> Smoke tests on Green -> Switch load balancer -> Blue becomes standby/rollback.

  • Pros: instant rollback | easy pre-switch testing | clean version separation
  • Cons: requires 2x resources | database migrations need care
  • Use when: instant rollback needed | critical services | regulated environments

Canary Deployment

Gradual traffic shift: 5% -> 25% -> 50% -> 100%, monitoring metrics at each step.

Argo Rollouts config:

yaml
spec:
  strategy:
    canary:
      steps:
      - setWeight: 5
      - pause: {duration: 10m}
      - setWeight: 25
      - pause: {duration: 10m}
      - setWeight: 50
      - pause: {duration: 10m}
      - setWeight: 100
      analysis:
        templates:
        - templateName: success-rate
  • Pros: low blast radius | real traffic validation | automatic rollback
  • Cons: more complex | requires good observability
  • Use when: high-traffic services | real-world validation needed | risk-sensitive

Progressive Delivery

Feature flags + canary + automatic rollback. Components: feature flags for gradual rollout | canary analysis for automatic decisions | SLO monitoring for health validation. Tools: Argo Rollouts | Flagger | LaunchDarkly/Flagsmith.

Branch and Release Strategies

Select branching strategy matching team maturity, release cadence, and risk profile. Shapes pipeline triggers, environment promotion, and release automation.

Trunk-Based Development

Single main branch, short-lived feature branches (< 1 day). Direct commits to main allowed with protection. Releases from main via tags.

  • CI/CD: Every commit to main triggers full pipeline. Requires robust automated gates since main always releasable. Feature flags manage incomplete work.
  • Triggers: push: [main], tags: ['v*']
  • Use when: high-performing teams | continuous deployment | mature test suites.

GitHub Flow

Feature branches from main, PRs with review, merge to main after approval. Releases from main.

  • CI/CD: PR-triggered pipelines run commit + acceptance stages. Merge to main triggers deployment. Requires PR quality gates.
  • Triggers: pull_request: [main], push: [main]
  • Use when: teams practicing continuous delivery with code review culture.

GitFlow

Structured branches: main (production) | develop (integration) | feature/* | release/* | hotfix/*.

  • CI/CD: Branch-specific pipelines. Feature branches: commit stage only. Develop: commit + acceptance. Release: full pipeline. Hotfix: commit + acceptance with fast-track to production.
  • Triggers: push: [main, develop, 'release/**', 'hotfix/**'], pull_request: [develop]
  • Use when: scheduled releases | multiple versions in production | regulated environments.

Release Branching

Long-lived release branches (e.g., release/1.x, release/2.x), cherry-pick fixes between branches.

  • CI/CD: Per-branch pipelines with independent deployment targets. Cross-branch validation when cherry-picking.
  • Triggers: push: [main, 'release/**']
  • Use when: supporting multiple product versions | enterprise software with customer-specific releases.

Branch Protection Rules (main)

Require PR reviews (2+ approvers) | Require status checks to pass | Require signed commits | Require linear history | Restrict force pushes and deletions.

Release Workflow

Semantic versioning (MAJOR.MINOR.PATCH): Create release branch -> Bump version -> Update CHANGELOG -> Run full test suite -> Create release tag -> Deploy to production -> Merge back to main.

CI/CD Architecture Lessons

Test Architecture and Measurement Coupling

Test execution architecture changes require simultaneous measurement strategy updates. Fundamental principle: treat test execution architecture and measurement strategy as tightly coupled concerns.

Common Pitfalls

PitfallSymptomPrevention
False failure syndromeQuality gates fail after CI/CD change without code changesValidate measurement strategy in isolated environment first
Baseline driftIncreasing threshold adjustments without justificationMaintain versioned baseline documentation
Tool assumption violationsInconsistent metrics across CI/CD runsReview tool docs for architecture-specific behaviors

CI/CD Change Checklist

Before: Analyze impact on test discovery | Identify affected measurement tools (coverage, mutation testing) | Document current baseline metrics. During: Adjust coverage thresholds for new execution model | Validate measurement strategy compatibility | Recalibrate quality gate thresholds. After: Establish new baseline metrics | Validate measurement accuracy against known scenarios | Update runbooks with measurement strategy changes.

Simplest Solution Check for Infrastructure

Before proposing multi-service infrastructure (>3 components), document rejected simple alternatives:

  • Single-service deployment (no orchestration) | Managed services instead of self-hosted
  • Simple CI/CD (no canary/blue-green) | Monolithic deployment (no microservices infrastructure)

Format:

markdown
## Rejected Simple Alternatives

### Alternative 1: {Simplest possible approach}
- **What**: {description}
- **Expected Impact**: {what % of requirements this meets}
- **Why Insufficient**: {specific, evidence-based reason}

よくある質問

AIスキル「Nw Cicd And Deployment」では何ができますか?

CI/CDパイプラインの設計手法、デプロイ戦略、GitHub Actionsのパターン、ブランチ/リリース戦略を解説します。パイプラインやデプロイのワークフローを設計するときに読み込みます。

TypingMindでNw Cicd And Deploymentを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Nw Cicd And Deploymentはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにNw Cicd And Deploymentをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-cicd-and-deploymentを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Nw Cicd And Deploymentを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Nw Cicd And Deploymentで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもNw Cicd And Deploymentを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Nw Cicd And Deployment」は無料ですか?

はい。nWave-aiがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇