Appearance
CI/CD Pipeline Design
Overview
GitLab CI/CD pipeline for partizap-frontend with semantic-release auto-versioning. All validation and release jobs run inside Docker containers (node:22-alpine) on a shell executor.
Pipeline Architecture
develop push:
lint ─────────┐
typecheck ────┼─→ docker build dev → deploy staging (auto)
test ─────────┘
(docker run node:22-alpine, parallel)
main push:
semantic-release (docker run node:22-alpine + git) → tag v*
tag v*:
docker build prod (versioned + latest) → deploy prod (manual button)Three Pipelines
| Trigger | Stages | Deploy |
|---|---|---|
push to develop | validate (parallel) → build → deploy | dev.partizap.ru (auto) |
push to main | release | creates tag v* |
tag v* | build → deploy | partizap.ru (manual) |
Design Decisions
Validation only on develop
Code is verified on develop. By the time it's merged to main, it's already passed lint/typecheck/test. No need to re-run on main.
Each validate job is self-contained
Each job runs docker run node:22-alpine sh -c "npm ci && npm run <command>". No shared state, no install stage, no artifacts, no cache. Simple and debuggable.
Trade-off: npm ci runs 3 times (~11 sec each). But jobs are parallel, so wall time is +11 sec, not +33 sec.
npm ci always runs inside node:22-alpine
Eliminates lockfile version mismatch between local dev (npm 11 / Node 24) and CI. The lockfile is always consumed by the same npm version that exists in node:22-alpine.
semantic-release in Docker
Runs in node:22-alpine with apk add git. Requires GITLAB_TOKEN passed as env var. Uses --ignore-scripts (nuxt prepare not needed for release).
@nuxt/eslint always enabled
Remove NODE_ENV !== 'production' condition from nuxt.config.ts. Nuxt tree-shakes the eslint module at build time — it doesn't affect production bundle.
Prod deploy is manual
Tag pipeline builds the Docker image, but deploy requires manual click in GitLab UI. Prevents accidental production deploys.
Docker images tagged with version
partizap-frontend-prod:v1.2.3 + partizap-frontend-prod:latest. Enables rollback to specific version.
Conventional Commits → Versioning
| Prefix | Version bump | Example |
|---|---|---|
feat: | minor (1.0→1.1) | feat: catalog filters |
fix: | patch (1.0.0→1.0.1) | fix: broken pagination |
perf: | patch | perf: cache categories |
BREAKING CHANGE: | major (1→2) | in commit body |
chore: / docs: / ci: | no release | chore: update deps |
GitLab Requirements
CI/CD Variables
| Variable | Description |
|---|---|
GITLAB_TOKEN | Project Access Token (api + write_repository), Masked + Protected |
Protected Tags
Pattern v* — only maintainers or CI can create version tags.
Files
| File | Purpose |
|---|---|
.gitlab-ci.yml | Pipeline definition |
.releaserc.json | semantic-release config |
Dockerfile | Multi-stage build (deps → build → runtime) |
docker-compose.dev.yml | Staging container (port 3000) |
docker-compose.prod.yml | Production container (port 3001) |
Changes Required
.gitlab-ci.yml— rewrite: remove install stage, validate viadocker run, release viadocker runnuxt.config.ts— removeNODE_ENV !== 'production'condition for@nuxt/eslintCLAUDE.md— update CI/CD section