gitlabAvoid common GitLab CI/CD mistakes — rules gotchas, silent failures, and YAML merge traps.
Install via ClawdBot CLI:
clawdbot install ivangdavila/gitlabrules: and only:/except: can't mix — use one or the other per jobwhen: defaults to on_success — rules: - if: $CI_COMMIT_TAG runs on tagrules: [] means never run — different from no rules at all- when: never at end to prevent fallthrough — otherwise unmatched conditions may rundocker:dind on non-privileged runner — fails with cryptic Docker errorsextends: doesn't deep merge arrays — scripts, variables arrays get replaced, not appended!reference [.job, script] to reuse — script: [!reference [.base, script], "my command"]include: files can override each other — last one wins for same keys&/* don't work across files — use extends: for cross-file reusedependencies: [] to skip if not neededneeds: downloads artifacts by default — needs: [{job: x, artifacts: false}] to skipDOCKER_HOST: tcp://docker:2375 required — job uses wrong Docker otherwiseDOCKER_TLS_CERTDIR: "" or configure TLS properly — half-configured TLS breaks buildsCI_PIPELINE_SOURCE differs by trigger — push, merge_request_event, schedule, api, triggerrules: - if: $CI_MERGE_REQUEST_IID — not just branch rulesGenerated Mar 1, 2026
A SaaS company uses GitLab CI/CD to automate testing and deployment across multiple microservices. They need to avoid silent failures like runner tag mismatches and YAML merge traps in extends to ensure reliable, fast deployments without cryptic errors. This scenario helps maintain high availability and reduce downtime during updates.
An e-commerce platform leverages GitLab for continuous integration to handle high-traffic events like Black Friday. They must manage rules gotchas, such as mixing rules with only/except, and artifacts vs cache strategies to optimize build times and ensure smooth, error-free deployments under load.
A cloud infrastructure team uses GitLab CI/CD to automate Terraform or Ansible deployments. They need to avoid Docker-in-Docker issues on shared runners and handle pipeline triggers correctly for merge requests to test infrastructure changes safely before production rollout.
A mobile app development studio uses GitLab to build and test iOS/Android apps. They must prevent silent failures from protected variables on non-protected branches and use artifacts efficiently to share build outputs between stages, ensuring consistent app releases across platforms.
A data science team employs GitLab CI/CD to automate machine learning model training and deployment. They need to navigate YAML merge traps with extends and reference tags to reuse scripts, and manage cache vs artifacts for large datasets to speed up iterative model updates.
This model involves offering GitLab CI/CD expertise as a managed service, where clients pay a monthly fee for pipeline optimization, monitoring, and troubleshooting. Revenue comes from recurring subscriptions, with tiers based on usage or support levels, targeting mid-sized tech companies.
Providing one-on-one or group consulting sessions to help businesses implement and optimize GitLab CI/CD pipelines. Revenue is generated through hourly rates or fixed project fees, with additional income from workshops and certification courses for DevOps teams.
Developing and selling tools or plugins that integrate with GitLab to automate checks for common mistakes like rules gotchas or silent failures. Revenue comes from premium features, such as advanced analytics or custom alerts, while offering a basic free version to attract users.
💬 Integration Tip
Integrate this skill by setting up automated linting for GitLab CI/CD YAML files to catch rules gotchas early, and use monitoring tools to alert on silent failures like runner mismatches or Docker-in-Docker issues.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Query the DeepWiki MCP server for GitHub repository documentation, wiki structure, and AI-powered questions.
Automated GitHub PR code review with diff analysis, lint integration, and structured reports. Use when reviewing pull requests, checking for security issues,...
Essential Git commands and workflows for version control, branching, and collaboration.
Advanced git operations beyond add/commit/push. Use when rebasing, bisecting bugs, using worktrees for parallel development, recovering with reflog, managing subtrees/submodules, resolving merge conflicts, cherry-picking across branches, or working with monorepos.
Format commit messages using the Conventional Commits specification. Use when creating commits, writing commit messages, or when the user mentions commits, git commits, or commit messages. Ensures commits follow the standard format for automated tooling, changelog generation, and semantic versioning.