gitdataai/scripts
ZhenYi 14f6e1e500 feat(core): initialize project with access control and AI integration
- Add gitignore and prettier configuration files for project scaffolding
- Implement room access control service with project member verification
- Create user access key management with CRUD operations and activity logging
- Add accordion UI component for frontend expandable sections
- Implement room AI configuration with list, upsert, and delete operations
- Add AI event types for agent join/leave/status change tracking
- Create streaming AI processing services for mode and react patterns
- Build room AI service with model detection and idempotency handling
- Integrate chat service orchestration for AI message processing
- Add typing indicators and stream cancellation for AI interactions
- Implement mention parsing and context extraction for AI agents
2026-05-03 06:04:31 +08:00
..
fix-openapi-tags.js init 2026-04-15 09:08:09 +08:00
gen-client.js init 2026-04-15 09:08:09 +08:00
generate-changelog-data.js feat(changelog): add /changelog page with i18n support 2026-04-27 21:59:50 +08:00
README.md init 2026-04-15 09:08:09 +08:00

构建脚本

一键构建脚本

build.js - 构建镜像

# 构建所有镜像
node scripts/build.js

# 构建指定服务
node scripts/build.js app gitserver

# 指定 tag
TAG=v1.0.0 node scripts/build.js

# 指定架构
TARGET=aarch64-unknown-linux-gnu node scripts/build.js

环境变量:

变量 默认值 说明
REGISTRY harbor.gitdata.me/gta_team 镜像仓库
TAG latest 镜像标签
TARGET x86_64-unknown-linux-gnu Rust 交叉编译目标

push.js - 推送镜像

# 推送所有镜像
HARBOR_USERNAME=user HARBOR_PASSWORD=pass node scripts/push.js

# 推送指定服务
HARBOR_USERNAME=user HARBOR_PASSWORD=pass TAG=sha-abc123 node scripts/push.js app

环境变量:

变量 默认值 说明
REGISTRY harbor.gitdata.me/gta_team 镜像仓库
TAG latest 或 Git SHA 镜像标签
HARBOR_USERNAME - 必填 仓库用户名
HARBOR_PASSWORD - 必填 仓库密码

deploy.js - 部署到 Kubernetes

# 部署最新镜像
node scripts/deploy.js

# 干跑模式(不实际部署)
node scripts/deploy.js --dry-run

# 部署并运行数据库迁移
node scripts/deploy.js --migrate

# 指定 tag
TAG=sha-abc123 node scripts/deploy.js

# 指定命名空间
NAMESPACE=staging node scripts/deploy.js

环境变量:

变量 默认值 说明
REGISTRY harbor.gitdata.me/gta_team 镜像仓库
TAG latest 或 Git SHA 镜像标签
NAMESPACE gitdata K8s 命名空间
RELEASE gitdata Helm Release 名称
KUBECONFIG ~/.kube/config Kubeconfig 路径

完整 CI/CD 流程

# 1. 构建
node scripts/build.js

# 2. 推送
HARBOR_USERNAME=user HARBOR_PASSWORD=pass node scripts/push.js

# 3. 部署
node scripts/deploy.js --migrate

本地开发

# 本地构建测试
node scripts/build.js app

# 使用本地 tag
TAG=dev node scripts/build.js

# 部署到测试环境
NAMESPACE=test node scripts/deploy.js