When to use this skill
Use this skill whenever the user wants to:
- Writing or debugging GitLab CI pipelines (
.gitlab-ci.yml) - Configuring GitLab Runner, stages, jobs, artifacts
- Setting up GitLab CI/CD variables, secrets, environments
- Integrating test, build, and deployment automation
How to use this skill
- Pipeline structure: Define in YAML
stages、jobs; each job belongs to a stage. - Runner configuration: shared runner, specific runner, tags selection.
- Artifacts and caching: Pass build artifacts between jobs, use cache for acceleration.
- Environments and deployment: Use
environmentto define deployment targets, configureonly/exceptrules.
Best Practices
- Use
stagesto clarify build order; jobs run in parallel. - Use CI/CD variables for sensitive information (Settings → CI/CD → Variables); do not hardcode them in yaml.
- Use
needsto implement complex dependency graphs and avoid unnecessary waiting. - Add
artifactsto failed jobs to retain logs and artifacts.
Keywords
gitlab ci, gitlab-ci, pipeline, runner, ci/cd, 流水线, 自动化部署, gitlab runner