Skill

Design and Implement CI/CD Deployment Pipelines

Architecture patterns for multi-stage CI/CD pipelines - approval gates, rolling/blue-green/canary deploys, rollback.

Works with githubgitlabazure pipelineskubernetesargo rollouts

91
Spark score
out of 100
Updated 29 days ago
Version 14.1.0

Add to Favorites

Why it matters

Design and implement robust, secure, and efficient CI/CD pipelines. This asset provides architecture patterns and best practices for multi-stage deployments, approval gates, and various deployment strategies to ensure speed and safety.

Outcomes

What it gets done

01

Design CI/CD architecture with approval gates

02

Implement progressive delivery strategies (rolling, blue-green, canary)

03

Configure multi-environment pipelines with verification and rollback

04

Establish deployment best practices and monitor key metrics

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-deployment-pipeline-design | bash

Overview

Deployment Pipeline Design

Architecture patterns for multi-stage CI/CD pipelines: a nine-stage flow, three approval-gate patterns, four deployment strategies (rolling, blue-green, canary, feature flags), and automated rollback. Use when designing CI/CD architecture, adding deployment approval gates, configuring multi-environment pipelines, or implementing progressive delivery.

What it does

Deployment Pipeline Design provides architecture patterns for multi-stage CI/CD pipelines with approval gates and deployment strategies, aiming to balance speed with safety. It defines a standard nine-stage pipeline flow - Source, Build, Test, Staging Deploy, Integration Tests, Approval Gate, Production Deploy, Verification, and Rollback - and three approval-gate patterns: Manual Approval (GitHub Actions environment protection rules), Time-Based Approval (GitLab CI's when: delayed with a start_in wait), and Multi-Approver (Azure Pipelines' ManualValidation task notifying named reviewers). Four deployment strategies are documented with characteristics: Rolling Deployment (gradual, zero-downtime, easy rollback, best for most apps) via Kubernetes' RollingUpdate strategy:

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

Blue-Green (instant switchover, easy rollback, temporarily doubles infrastructure cost, good for high-risk deploys), Canary (gradual traffic-weight shifts with pauses via Argo Rollouts, risk mitigation with real user testing, requires a service mesh), and Feature Flags (deploy without releasing, A/B testing, instant rollback, illustrated with the Flagsmith Python SDK).

When to use - and when NOT to

Use this skill when designing CI/CD architecture, implementing deployment gates, configuring multi-environment pipelines, establishing deployment best practices, or implementing progressive delivery. It is not for tasks unrelated to deployment pipeline design or for work in a different domain or tool outside this scope.

Inputs and outputs

Given a pipeline-design task, the skill outputs a full multi-stage GitHub Actions pipeline example - build, test with a Trivy security scan, deploy-staging, integration-test, canary deploy-production via Argo Rollouts promote, and a verify job with a health check and Slack webhook notification - plus rollback implementations: an automated rollback that health-checks after deploy and runs kubectl rollout undo on failure, and manual rollback commands (kubectl rollout history, kubectl rollout undo --to-revision=N). It also tracks six key pipeline metrics - Deployment Frequency, Lead Time, Change Failure Rate, Mean Time to Recovery (MTTR), Pipeline Success Rate, and Average Pipeline Duration - and a Prometheus-based post-deployment error-rate check that fails the pipeline if the error rate exceeds a threshold.

Integrations

References github-actions-templates, gitlab-ci-patterns, and secrets-management as related skills for deeper implementation in each ecosystem, plus references/pipeline-orchestration.md for complex pipeline patterns and assets/approval-gate-template.yml for reusable approval-workflow templates. Ten best practices are stated: fail fast by running quick tests first, run independent jobs in parallel, cache dependencies between runs, manage build artifacts, keep environments at parity, use a secrets store such as Vault, schedule deployment windows appropriately, integrate monitoring, automate rollback on failure, and document pipeline stages.

Who it's for

Platform and DevOps engineers designing or hardening a CI/CD pipeline who need concrete, working examples of approval gates, deployment strategies, and rollback automation across GitHub Actions, GitLab CI, Azure Pipelines, and Kubernetes/Argo Rollouts, rather than assembling a pipeline from scratch.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.