wshobson avatar

Gitlab Ci Patterns

Solid collection of GitLab CI patterns that covers the essentials without getting lost in edge cases. The Docker build examples handle registry authentication properly, the multi-environment deployment uses YAML anchors to avoid repetition, and the caching configurations actually make sense for real projects. The Terraform pipeline includes the validation and manual approval gates you'd want in production. Security scanning integration uses both GitLab's built-in templates and Trivy for container scanning. The dynamic child pipeline example is genuinely useful for monorepos where you need different pipelines based on what changed.

skills.sh installs
13.6K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill gitlab-ci-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

GitLab CI Patterns

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

Purpose

Create efficient GitLab CI pipelines with proper stage organization, caching, and deployment strategies.

When to Use

  • Automate GitLab-based CI/CD
  • Implement multi-stage pipelines
  • Configure GitLab Runners
  • Deploy to Kubernetes from GitLab
  • Implement GitOps workflows

Basic Pipeline Structure

stages:
  - build
  - test
  - deploy

variables:
  DOCKER_DRIVER: overlay2
  DOCKER_TLS_CERTDIR: "/certs"

build:
  stage: build
  image: node:20
  script:
    - npm ci
    - npm run build
  artifacts:
    paths:
      - dist/
    expire_in: 1 hour
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - node_modules/

test:
  stage: test
  image: node:20
  script:
    - npm ci
    - npm run lint
    - npm test
  coverage: '/Lines\s*:\s*(\d+\.\d+)%/'
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: coverage/cobertura-coverage.xml

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Testing & QA, DevOps & CI/CD, Git & Pull Requests, Debugging, Automation & Workflows, Sales & Marketing

More from wshobson/agents

All 174
1wshobson avatarllm-evaluationwshobson/agentsImplement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, 13.3Kskills.sh installs
2wshobson avatarwcag-audit-patternswshobson/agentsConduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixin13Kskills.sh installs
3samber avatargolang-refactoringsamber/cc-skills-golangGolang refactoring — the safe, at-scale process for restructuring existing Go code: a coverage-adaptive safety net, tool-driven behavior-preserving transforms (12.9Kskills.sh installs
4wshobson avatardependency-upgradewshobson/agentsManage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating11.5Kskills.sh installs
5alchaincyf avatardarwin-skillalchaincyf/darwin-skillDarwin Skill 2.0 (达尔文.skill 2.0): autonomous skill optimizer, v2.0 integrates Microsoft Research SkillLens (arXiv 2605.23899) 9-dim rubric + SkillOpt (arXiv 26011.4Kskills.sh installs
6wshobson avatarairflow-dag-patternswshobson/agentsBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workfl11.3Kskills.sh installs