Full-stack-skills gitlab-ci
Provides comprehensive guidance for GitLab CI/CD including pipeline configuration, runners, artifacts, environments, and deployment automation. Use when the user asks about GitLab CI, needs to create pipelines, configure runners, or automate builds and deployments.
install
source · Clone the upstream repo
git clone https://github.com/partme-ai/full-stack-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/partme-ai/full-stack-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/devops-skills/gitlab-ci" ~/.claude/skills/partme-ai-full-stack-skills-gitlab-ci && rm -rf "$T"
manifest:
skills/devops-skills/gitlab-ci/SKILL.mdsource content
When to use this skill
Use this skill whenever the user wants to:
- Write or debug GitLab CI pipelines (
).gitlab-ci.yml - Configure GitLab Runner, stages, jobs, and artifacts
- Set up CI/CD variables, secrets, and environments
- Integrate testing, building, and deployment automation
- Use
for complex dependency graphs between jobsneeds
How to use this skill
Workflow
- Define stages — declare the pipeline execution order
- Write jobs — assign each job to a stage with scripts and rules
- Configure artifacts and cache — pass build outputs between jobs
- Set up environments — define deployment targets with rules
Quick Start Example
# .gitlab-ci.yml stages: - test - build - deploy variables: NODE_VERSION: "20" test: stage: test image: node:${NODE_VERSION} cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ script: - npm ci - npm test artifacts: when: on_failure paths: - test-reports/ expire_in: 7 days build: stage: build image: node:${NODE_VERSION} needs: [test] script: - npm ci - npm run build artifacts: paths: - dist/ deploy_production: stage: deploy needs: [build] environment: name: production url: https://myapp.example.com script: - ./scripts/deploy.sh rules: - if: $CI_COMMIT_BRANCH == "main"
Key Concepts
| Feature | Purpose |
|---|---|
| Define execution order |
| Create DAG dependencies (skip stage waiting) |
| Pass files between jobs |
| Speed up repeated installs |
| Control when jobs run |
| Track deployment targets |
Best Practices
- Use
to define clear build order; jobs within a stage run in parallelstages - Store sensitive values in CI/CD Variables (Settings > CI/CD > Variables) — never hardcode in YAML
- Use
to create complex dependency graphs and avoid unnecessary waitingneeds - Preserve logs and artifacts on failure with
artifacts: when: on_failure - Use
instead of deprecatedrules
for conditional job executiononly/except
Troubleshooting
- Job stuck pending: Check runner tags match and runners are available
- Artifact not found: Verify the producing job completed and artifact paths are correct
- Cache not restoring: Ensure cache key is consistent; check runner cache configuration
- Pipeline not triggered: Verify
conditions match the event (push, merge request, etc.)rules
Keywords
gitlab ci, gitlab-ci, pipeline, runner, ci/cd, artifacts, cache, environments, deployment automation