gitlab-ci-patterns

Define multi-stage GitLab CI/CD pipelines for build, test, and deploy automation.

Updated May 17, 2026
One-click install
npx skills add https://github.com/cenjie/skills --skill gitlab-ci-patterns-cenjie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitlab-ci-patterns
Source: https://github.com/cenjie/skills/tree/main/skills/cicd-automation/skills/gitlab-ci-patterns
Command: npx skills add https://github.com/cenjie/skills --skill gitlab-ci-patterns-cenjie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create reliable, maintainable, and performant GitLab CI/CD pipelines that reduce build times, avoid redundant work, and standardize deployments across environments.

Core Features & Use Cases

  • Multi-stage pipeline patterns for build, test, and deploy stages with artifacts and coverage reporting.
  • Docker build and push workflows using Docker-in-Docker and registry authentication with CI variables.
  • Multi-environment Kubernetes deployments and GitOps-friendly templates with manual gates for production.
  • Terraform plan and apply stages for infrastructure automation, including artifacts and manual approvals.
  • Security scanning integration and caching strategies to speed up pipelines and surface vulnerabilities early.
  • Use case: Implement a pipeline that builds a Node.js app, runs lint/test/coverage, builds Docker images, runs security scans, and deploys to staging and production with manual approval.

Quick Start

Create a multi-stage GitLab CI pipeline that builds your app, caches dependencies, runs tests and security scans, pushes a Docker image, and deploys to staging with a manual production promotion.

Frequently Asked Questions about gitlab-ci-patterns

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

FAQPage Schema
How do I create a multi-stage GitLab CI pipeline for build, test, and deploy?

A multi-stage GitLab CI pipeline automates building, testing, and deploying applications by defining staged jobs with artifacts, coverage reporting, and caching to reduce build times and avoid redundant work across environments.

How do I build and push Docker images in GitLab CI pipelines?

Docker build and push workflows in GitLab CI use Docker-in-Docker with registry authentication configured via CI variables, enabling containerized builds that standardize image delivery across deployment environments.

Can I run Terraform plan and apply stages in GitLab CI?

Terraform plan and apply stages in GitLab CI enable infrastructure automation by defining staged jobs with manual approvals, passing plan artifacts between stages to review changes before applying infrastructure modifications.

How do I integrate security scanning into GitLab CI pipelines?

Security scanning integration in GitLab CI surfaces vulnerabilities early by adding scan stages to your pipeline, combining with caching strategies to maintain fast build times while detecting issues before deployment.

What's the best way to deploy to Kubernetes using GitLab CI?

Multi-environment Kubernetes deployments in GitLab CI use GitOps-friendly templates with manual gates for production, enabling staged rollouts that standardize deployments across environments while requiring approval for production releases.

How do I use dynamic child pipelines in GitLab CI?

Dynamic child pipelines in GitLab CI allow scalable automation by generating pipeline configurations at runtime, enabling complex multi-stage workflows that adapt to build, test, and deploy requirements across containerized and infrastructure workflows.