首页/DevOps/gitlab-cicd-pipeline
G

gitlab-cicd-pipeline

by @aj-geddesv1.0.0
0.0(0)

Design and implement GitLab CI/CD pipelines with stages, jobs, artifacts, and caching. Configure runners, Docker integration, and deployment strategies.

GitLab CI/CDCI/CD PipelinesDevOps AutomationContinuous IntegrationContinuous DeploymentGitHub
安装方式
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline
compare_arrows

Before / After 效果对比

0

description 文档


name: gitlab-cicd-pipeline description: > Design and implement GitLab CI/CD pipelines with stages, jobs, artifacts, and caching. Configure runners, Docker integration, and deployment strategies.

GitLab CI/CD Pipeline

Table of Contents

Overview

Create comprehensive GitLab CI/CD pipelines that automate building, testing, and deployment using GitLab Runner infrastructure and container execution.

When to Use

  • GitLab repository CI/CD setup
  • Multi-stage build pipelines
  • Docker registry integration
  • Kubernetes deployment
  • Review app deployment
  • Cache optimization
  • Dependency management

Quick Start

Minimal working example:

# .gitlab-ci.yml
image: node:18-alpine

variables:
  DOCKER_DRIVER: overlay2
  FF_USE_FASTZIP: "true"

stages:
  - lint
  - test
  - build
  - security
  - deploy-review
  - deploy-prod

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - node_modules/
    - .npm/

lint:
  stage: lint
  script:
    - npm install
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

| Guide | Contents | |---|---| | Complete Pipeline Configuration | Complete Pipeline Configuration | | GitLab Runner Configuration | GitLab Runner Configuration | | Docker Layer Caching Optimization | Docker Layer Caching Optimization | | Multi-Project Pipeline | Multi-Project Pipeline | | Kubernetes Deployment | Kubernetes Deployment, Performance Testing Stage, Release Pipeline with Semantic Versioning |

Best Practices

✅ DO

  • Use stages to organize pipeline flow
  • Implement caching for dependencies
  • Use artifacts for test reports
  • Set appropriate cache keys
  • Implement conditional execution with only and except
  • Use needs: for job dependencies
  • Clean up artifacts with expire_in
  • Use Docker for consistent environments
  • Implement security scanning stages
  • Set resource limits for jobs
  • Use merge request pipelines

❌ DON'T

  • Run tests serially when parallelizable
  • Cache everything unnecessarily
  • Leave large artifacts indefinitely
  • Store secrets in configuration files
  • Run privileged Docker without necessity
  • Skip security scanning
  • Ignore pipeline failures
  • Use only: [main] without proper controls

forum用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价,来写第一条吧

统计数据

安装量0
评分0.0 / 5.0
版本1.0.0
更新日期2026年3月17日
对比案例0 组

用户评分

0.0(0)
5
0%
4
0%
3
0%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code

时间线

创建2026年3月17日
最后更新2026年3月17日