ci: дымовой тест на push и полный release gate

This commit is contained in:
2026-10-28 13:26:38 +03:00
parent 4ef6c7f7ed
commit 71fa3284a0
6 changed files with 148 additions and 38 deletions

View File

@@ -3,6 +3,7 @@
# должен разрешать privileged-сервисы (docker:dind) и сеть до docker:2375.
stages:
- check
- smoke
- release-evidence
variables:
@@ -33,18 +34,36 @@ check:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH'
# Дымовой тест на каждый push/MR: полный стек на одноразовой БД, health,
# вход и один доменный сценарий. Полный release gate — ниже.
smoke:
stage: smoke
# Shell-runner: скрипт поднимает реальный стек на localhost и проверяет его.
# На runner нужны Java 21, Docker Compose v2, Python 3 и bash.
tags: [lms-shell]
cache:
key: "gradle-$CI_COMMIT_REF_SLUG"
paths:
- .gradle/caches
- .gradle/wrapper
script:
- ./scripts/ldd-smoke.sh
artifacts:
when: always
paths:
- build/evidence/smoke.json
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH'
# Ручной release gate: runtime, mutation и browser evidence.
# Нужен privileged docker:dind; Chromium и Node ставятся в before_script.
release-evidence:
stage: release-evidence
image: eclipse-temurin:21-jdk
services:
- name: docker:27-dind
alias: docker
# Shell-runner с Java 21, Docker Compose v2, Node 22, Chromium Playwright.
tags: [lms-release]
before_script:
- apt-get update
- apt-get install -y nodejs npm
- cd e2e && npm ci && npx playwright install --with-deps chromium && cd ..
- cd e2e && npm ci && npx playwright install chromium && cd ..
cache:
key: "gradle-$CI_COMMIT_REF_SLUG"
paths:
@@ -58,5 +77,7 @@ release-evidence:
- build/evidence/
- build/reports/evidence/
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
- if: '$CI_COMMIT_BRANCH'
when: manual