# Gitlab CI Patterns

> Build GitLab CI/CD pipelines with multi-stage workflows, caching, and distributed runners for scalable automation.

- Skill: `firstsun-dev/gitlab-ci-patterns` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add firstsun-dev/gitlab-ci-patterns`
- Raw SKILL.md: https://api.skillmd.com/api/skills/firstsun-dev/gitlab-ci-patterns/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: firstsun-dev (https://skillmd.com/u/firstsun-dev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/firstsun-dev/gitlab-ci-patterns

---


# GitLab CI Patterns

Comprehensive GitLab CI/CD pipeline patterns for automated testing, building, and deployment.

## Pipeline Templates

Choose the appropriate reference based on your infrastructure:

- **Docker Patterns**: Building and pushing container images.
  - Read [references/DOCKER.md](references/DOCKER.md).
- **Terraform Patterns**: Automated IaC workflows.
  - Read [references/TERRAFORM.md](references/TERRAFORM.md).
- **Security & Optimization**: SAST, Dependency scanning, and caching.
  - Read [references/PIPELINE_OPTS.md](references/PIPELINE_OPTS.md).

---
## Best Practices
1. **Specific Tags**: Use `node:20`, not `latest`.
2. **Manual Gates**: Implement `when: manual` for production applies.
3. **Artifacts**: Use `artifacts` for build outputs and coverage reports.

