# Willyu1007 Skill Template Module Gitlab CI

> GitLab CI Integration (workflow)

- Skill: `tomevault-io/willyu1007-skill-template-module-gitlab-ci` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/willyu1007-skill-template-module-gitlab-ci`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/willyu1007-skill-template-module-gitlab-ci/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/willyu1007-skill-template-module-gitlab-ci

---


# GitLab CI Integration (workflow)

## Operating mode (token-efficient)
- Treat `gitlab-ci` as a **router + governor**.
- Do **not** load multiple procedures. Select exactly **one** procedure below and follow the chosen procedure end-to-end.

## Routing (pick one procedure)

| Task | Open the procedure | Optional templates |
|---|---|---|
| Enable/adjust test jobs (web/api/mobile/perf) | `reference/procedures/enable-test-jobs.md` | `reference/templates/gitlab-ci/` |
| Standardize artifacts + reporting | `reference/procedures/artifacts-and-reporting.md` | — |
| Troubleshoot CI failures | `reference/procedures/troubleshoot.md` | — |

## Shared non-negotiables (apply to all procedures)

1) **Test command contract**
   - Each suite must have a single deterministic command runnable in CI.
   - Template repo baseline commands:
     - `node .ai/scripts/lint-skills.mjs --strict`
     - `node .ai/scripts/lint-docs.mjs`
     - `node .ai/tests/run.mjs --suite <suite>`
   - For project test suites, define equivalent deterministic commands (examples):
     - API (Newman): `pnpm test:api` / `npm run test:api`
     - Web (Playwright): `pnpm test:e2e:playwright` / `npm run test:e2e:playwright`
     - Web (Cypress): `pnpm test:e2e:cypress` / `npm run test:e2e:cypress`
     - Perf (k6): `k6 run ...` (or containerized runner)
     - Mobile: `pnpm test:mobile:<detox|maestro|appium>` / custom runner script
   - Commands must:
     - exit non-zero on test failures
     - write evidence/artifacts to a predictable directory (e.g. `.ai/.tmp/test-evidence/` for the template repo, or `artifacts/<suite>/` for app suites)

2) **Artifacts are mandatory**
   - Always upload artifacts/evidence even on failure: `artifacts/` or `.ai/.tmp/test-evidence/`
   - Keep artifacts size-bounded (videos/traces on failure only when possible).

3) **Secrets management**
   - Use GitLab CI variables (masked/protected).
   - Never echo secrets in logs.

4) **Gating policy**
   - MR gating should run only fast, stable suites.
   - Heavy suites (mobile, load/stress) should be scheduled or manually triggered.

## Minimal inputs before changing CI
- Whether `.gitlab-ci.yml` already exists and how the file is structured (includes, stages)
- Which suites are MR-gated vs scheduled
- Required CI variables and how they map to env vars
- Runner constraints (Docker executor, macOS runners for iOS, etc.)

## Verification

- If you changed **skills**:
  - `node .ai/scripts/lint-skills.mjs --strict`
  - `node .ai/skills/features/ci/gitlab-ci/scripts/validate-skill.mjs`

- If you changed **.gitlab-ci.yml**:
  - Trigger a pipeline and confirm:
    - correct suite execution
    - artifacts retained
    - failures show clear signals

## Boundaries
- Do not hardcode secrets or base URLs in `.gitlab-ci.yml`.
- Do not make MR gating flaky; move unstable suites to scheduled runs.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/willyu1007) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

