Files
crank/scripts/README.md
T
github-ops eaa369bf85
Deploy / deploy (push) Successful in 1m26s
CI / Rust Checks (push) Successful in 4m40s
CI / UI Checks (push) Successful in 5s
CI / Deployment Manifests (push) Successful in 3s
CI / Frontend E2E (push) Successful in 4m34s
Add community scope gate
2026-06-20 17:59:58 +00:00

89 lines
2.2 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
```
## `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
```