ci-cd-pipelines

Create and optimize GitLab CI/CD pipelines with caching and deployment patterns.

Updated Sep 8, 2025
One-click install
npx skills add https://github.com/randalmurphal/claude-config --skill ci-cd-pipelines-randalmurphal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci-cd-pipelines
Source: https://github.com/randalmurphal/claude-config/tree/main/skills/ci-cd-pipelines
Command: npx skills add https://github.com/randalmurphal/claude-config --skill ci-cd-pipelines-randalmurphal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive patterns for building robust and efficient GitLab CI/CD pipelines, automating testing, Docker builds, and safe deployments. It helps teams accelerate development cycles, reduce deployment risks, and ensure continuous delivery of high-quality software.

Core Features & Use Cases

  • Optimized Pipeline Structure: Learn to define stages, jobs, and rules for efficient execution, including parallel testing and dependency control.
  • Advanced Caching Strategies: Implement Docker layer caching and dependency caching to drastically speed up build times (e.g., 20min → 5min).
  • Safe Deployment Patterns: Master blue-green, canary, and rolling deployments for zero-downtime releases and rapid rollbacks.
  • Use Case: Optimize an existing GitLab CI pipeline that takes 20 minutes to build and test by implementing parallel testing and Docker layer caching, aiming to reduce the total pipeline time to under 5 minutes.

Quick Start

Use the ci-cd-pipelines skill to generate a GitLab CI/CD configuration for a Python project that includes unit tests, Docker build with caching, and a manual deployment to staging.

Frequently Asked Questions about ci-cd-pipelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up GitLab CI/CD pipelines with caching and parallel testing?

Speed up GitLab CI/CD pipelines by implementing Docker layer caching for builds and dependency caching for tests, then configure parallel job execution across stages. These strategies reduce build times from 20+ minutes to under 5 minutes by reusing cached layers and distributing workload across runners.

What are blue-green and canary deployments in GitLab CI/CD?

Blue-green deployments run two identical production environments, switching traffic between them for zero-downtime releases and instant rollbacks. Canary deployments gradually route traffic to new versions, catching issues early. GitLab CI/CD pipelines orchestrate both patterns with automated testing and rollback procedures.

How do I configure secrets and environment variables in GitLab CI/CD pipelines?

GitLab CI/CD manages secrets through protected variables stored in project or group settings, accessible in .gitlab-ci.yml jobs via $VARIABLE syntax. Restrict secret exposure by marking variables as protected and masked, limiting access to specific branches or environments.

Can I use Docker builds with caching in GitLab CI/CD?

Yes, GitLab CI/CD supports Docker builds with layer caching using Docker-in-Docker runners or the Docker executor. Configure cache policies in .gitlab-ci.yml to preserve build layers between pipeline runs, significantly reducing rebuild time for unchanged dependencies.

What's the structure of a .gitlab-ci.yml file for multi-stage pipelines?

.gitlab-ci.yml defines stages (build, test, deploy), jobs within each stage, runner tags, artifacts, caching rules, and deployment rules. Stages execute sequentially, jobs within stages run in parallel, and dependencies control which artifacts flow to downstream jobs.

How do I set up automated rollbacks after failed deployments?

Implement rollback procedures in GitLab CI/CD by defining rollback jobs triggered on deployment failure, storing previous version artifacts, and using environment-specific deployment rules. Blue-green and canary patterns enable instant traffic switching to known-good versions without manual intervention.