File contents 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
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1 --- 2 name: aj-geddes-useful-ai-prompts-gitlab-cicd-pipeline 3 description: GitLab CI/CD Pipeline 4 --- 5 6 # GitLab CI/CD Pipeline 7 8 ## Table of Contents 9 10 - [Overview](#overview) 11 - [When to Use](#when-to-use) 12 - [Quick Start](#quick-start) 13 - [Reference Guides](#reference-guides) 14 - [Best Practices](#best-practices) 15 16 ## Overview 17 18 Create comprehensive GitLab CI/CD pipelines that automate building, testing, and deployment using GitLab Runner infrastructure and container execution. 19 20 ## When to Use 21 22 - GitLab repository CI/CD setup 23 - Multi-stage build pipelines 24 - Docker registry integration 25 - Kubernetes deployment 26 - Review app deployment 27 - Cache optimization 28 - Dependency management 29 30 ## Quick Start 31 32 Minimal working example: 33 34 ```yaml 35 # .gitlab-ci.yml 36 image: node:18-alpine 37 38 variables: 39 DOCKER_DRIVER: overlay2 40 FF_USE_FASTZIP: "true" 41 42 stages: 43 - lint 44 - test 45 - build 46 - security 47 - deploy-review 48 - deploy-prod 49 50 cache: 51 key: ${CI_COMMIT_REF_SLUG} 52 paths: 53 - node_modules/ 54 - .npm/ 55 56 lint: 57 stage: lint 58 script: 59 - npm install 60 // ... (see reference guides for full implementation) 61 ``` 62 63 ## Reference Guides 64 65 Detailed implementations in the `references/` directory: 66 67 | Guide | Contents | 68 |---|---| 69 | [Complete Pipeline Configuration](references/complete-pipeline-configuration.md) | Complete Pipeline Configuration | 70 | [GitLab Runner Configuration](references/gitlab-runner-configuration.md) | GitLab Runner Configuration | 71 | [Docker Layer Caching Optimization](references/docker-layer-caching-optimization.md) | Docker Layer Caching Optimization | 72 | [Multi-Project Pipeline](references/multi-project-pipeline.md) | Multi-Project Pipeline | 73 | [Kubernetes Deployment](references/kubernetes-deployment.md) | Kubernetes Deployment, Performance Testing Stage, Release Pipeline with Semantic Versioning | 74 75 ## Best Practices 76 77 ### ✅ DO 78 79 - Use stages to organize pipeline flow 80 - Implement caching for dependencies 81 - Use artifacts for test reports 82 - Set appropriate cache keys 83 - Implement conditional execution with `only` and `except` 84 - Use `needs:` for job dependencies 85 - Clean up artifacts with `expire_in` 86 - Use Docker for consistent environments 87 - Implement security scanning stages 88 - Set resource limits for jobs 89 - Use merge request pipelines 90 91 ### ❌ DON'T 92 93 - Run tests serially when parallelizable 94 - Cache everything unnecessarily 95 - Leave large artifacts indefinitely 96 - Store secrets in configuration files 97 - Run privileged Docker without necessity 98 - Skip security scanning 99 - Ignore pipeline failures 100 - Use `only: [main]` without proper controls 101 102 --- 103 > Converted and distributed by [TomeVault](https://tomevault.io/claim/aj-geddes) — claim your Tome and manage your conversions. 104 <!-- tomevault:4.0:skill_md:2026-04-11 -->
tomevault-io/skills-registry/tree/main/aj-geddes--useful-ai-prompts--gitlab-cicd-pipeline commit 37d76fad21
Frequently asked questions How do I install the Aj Geddes Useful AI Prompts Gitlab Cicd Pipeline skill? Run npx skillmds@latest add tomevault-io/aj-geddes-useful-ai-prompts-gitlab-cicd-pipeline in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Aj Geddes Useful AI Prompts Gitlab Cicd Pipeline skill do? GitLab CI/CD Pipeline It is listed under DevOps & Infra on SkillMD.
Is Aj Geddes Useful AI Prompts Gitlab Cicd Pipeline safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Aj Geddes Useful AI Prompts Gitlab Cicd Pipeline? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Aj Geddes Useful AI Prompts Gitlab Cicd Pipeline free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Aj Geddes Useful AI Prompts Gitlab Cicd Pipeline? tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.