Files
crank/scripts/README.md
T
github-ops 8096502bda
Deploy / deploy (push) Successful in 29s
CI / Rust Checks (push) Successful in 4m50s
CI / UI Checks (push) Successful in 5s
CI / Deployment Manifests (push) Successful in 2s
CI / Frontend E2E (push) Successful in 4m13s
Add deterministic product smoke
2026-06-20 18:07:57 +00:00

113 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Scripts
## `staging-smoke.sh`
Post-deploy smoke helper для staging/production-like окружений.
```bash
./scripts/staging-smoke.sh https://crank.example.com
```
## `authenticated-staging-smoke.sh`
Browser-authenticated smoke helper.
Обязательные переменные:
- `CRANK_STAGING_ADMIN_EMAIL`
- `CRANK_STAGING_ADMIN_PASSWORD`
```bash
CRANK_STAGING_ADMIN_EMAIL=owner@example.com \
CRANK_STAGING_ADMIN_PASSWORD=secret \
./scripts/authenticated-staging-smoke.sh https://crank.example.com
```
## `authenticated-product-smoke.sh`
Authenticated product smoke helper. Создает временную REST operation на
внутренний `admin-api` health endpoint, публикует агента, выпускает API-ключ и
проверяет MCP `tools/list` / `tools/call`. Внешние публичные API не используются.
Обязательные переменные:
- `CRANK_STAGING_ADMIN_EMAIL`
- `CRANK_STAGING_ADMIN_PASSWORD`
```bash
CRANK_STAGING_ADMIN_EMAIL=owner@example.com \
CRANK_STAGING_ADMIN_PASSWORD=secret \
./scripts/authenticated-product-smoke.sh https://crank.example.com
```
По умолчанию временные сущности удаляются после успешной проверки. Для отладки
можно оставить их в workspace:
```bash
CRANK_PRODUCT_SMOKE_KEEP_ASSETS=1 ./scripts/authenticated-product-smoke.sh https://crank.example.com
```
## `staging-note-block.sh`
Генерирует markdown-блок для `docs/staging-regression-notes.md` после реального
staging pass.
```bash
./scripts/staging-note-block.sh crank.example.com abc1234 "operator" partial
```
## `load-openbao-env.sh`
Логинится в OpenBao через AppRole и выгружает deploy/runtime secrets в локальный
shell env file.
Обязательные переменные:
- `BAO_ADDR`
- `BAO_ROLE_ID`
- `BAO_SECRET_ID`
- `OPENBAO_APP`
Опционально:
- `OPENBAO_ENV_FILE`, default `.openbao-env`
Скрипт читает KV v2 secrets из mount `ci`:
- `shared/registry`
- `shared/deploy-ssh`
- `projects/${OPENBAO_APP}/deploy`
- `projects/${OPENBAO_APP}/runtime`
Также он создает workflow-compatible aliases:
- `REGISTRY_USERNAME -> DEPLOY_REGISTRY_USER`
- `REGISTRY_PASSWORD -> DEPLOY_REGISTRY_TOKEN`
## `check-rust-code-health.sh`
Проверяет базовые правила сопровождаемости Rust-кода:
- новые `.rs` файлы не больше 1000 строк;
- существующие крупные файлы не должны расти сверх текущего baseline;
- крупные inline test modules подсвечиваются как debt.
```bash
./scripts/check-rust-code-health.sh
```
## `check-community-scope.sh`
Проверяет, что в community-репозиторий не попали функции и тексты за пределами
REST -> MCP сценария.
```bash
./scripts/check-community-scope.sh
```
Unit-тесты checker-а лежат в `tests/unit`:
```bash
python3 -m unittest discover -s tests/unit
```