store-module-architecture
Store 研发商店模块架构指南,涵盖插件/模板/镜像管理、版本发布、审核流程、商店市场、扩展点机制。当用户开发研发商店功能、发布插件、管理模板或实现扩展点时使用。
Install
mkdir -p .claude/skills/store-module-architecture && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4625" && unzip -o skill.zip -d .claude/skills/store-module-architecture && rm skill.zipInstalls to .claude/skills/store-module-architecture
About this skill
Store 研发商店模块架构指南
模块定位: Store 是 BK-CI 的研发商店模块,负责管理流水线插件(Atom)、流水线模板(Template)、容器镜像(Image)等可复用组件的发布、审核、安装、统计等全生命周期管理。
一、模块整体结构
1.1 子模块划分
src/backend/ci/core/store/
├── api-store/ # API 接口定义层
│ └── src/main/kotlin/com/tencent/devops/store/
│ ├── api/
│ │ ├── atom/ # 插件相关接口(25+ 文件)
│ │ ├── common/ # 通用接口(40+ 文件)
│ │ ├── container/ # 容器相关接口
│ │ ├── image/ # 镜像相关接口
│ │ └── template/ # 模板相关接口
│ ├── constant/ # 常量和消息码
│ └── pojo/ # 数据对象(100+ 文件)
│ ├── app/ # 应用相关
│ ├── atom/ # 插件相关
│ ├── common/ # 通用对象
│ ├── image/ # 镜像相关
│ └── template/ # 模板相关
│
├── biz-store/ # 业务逻辑层
│ └── src/main/kotlin/com/tencent/devops/store/
│ ├── atom/ # 插件业务
│ │ ├── dao/ # 插件数据访问
│ │ ├── factory/ # 工厂类
│ │ ├── resources/ # API 实现
│ │ └── service/ # 插件服务
│ ├── common/ # 通用业务
│ │ ├── dao/ # 通用数据访问(60+ 文件)
│ │ ├── handler/ # 处理器链
│ │ ├── resources/ # API 实现
│ │ └── service/ # 通用服务
│ ├── image/ # 镜像业务
│ └── template/ # 模板业务
│
├── model-store/ # 数据模型层(JOOQ 生成)
└── boot-store/ # Spring Boot 启动模块
1.2 Store 组件类型
| 类型 | 枚举值 | 说明 | 核心表 |
|---|---|---|---|
| 插件(Atom) | ATOM | 流水线可执行插件 | T_ATOM |
| 模板(Template) | TEMPLATE | 流水线模板 | T_TEMPLATE |
| 镜像(Image) | IMAGE | 容器构建镜像 | T_IMAGE |
二、核心概念
2.1 插件(Atom)模型
┌─────────────────────────────────────────────────────────────────────────┐
│ 插件模型 │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ T_ATOM(插件主表) │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ ATOM_CODE │ │ NAME │ │ VERSION │ │ │
│ │ │ (插件标识) │ │ (插件名称) │ │ (版本号) │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ ATOM_STATUS │ │ CLASS_TYPE │ │ LATEST_FLAG │ │ │
│ │ │ (插件状态) │ │ (插件大类) │ │ (最新版本) │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └──────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌────────────────────┼────────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
│ │ T_ATOM_ENV_ │ │ T_ATOM_ │ │ T_ATOM_ │ │
│ │ INFO │ │ FEATURE │ │ VERSION_LOG │ │
│ │ (执行环境信息) │ │ (特性配置) │ │ (版本日志) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
2.2 插件核心字段
| 字段 | 类型 | 说明 |
|---|---|---|
ID | String | 插件版本 ID(UUID) |
ATOM_CODE | String | 插件唯一标识(不变) |
NAME | String | 插件名称 |
VERSION | String | 版本号(如 1.0.0) |
ATOM_STATUS | Int | 插件状态 |
CLASS_TYPE | String | 插件大类(marketBuild 等) |
JOB_TYPE | String | 适用 Job 类型(AGENT/AGENT_LESS) |
OS | String | 支持的操作系统 |
CLASSIFY_ID | String | 分类 ID |
LATEST_FLAG | Boolean | 是否最新版本 |
DEFAULT_FLAG | Boolean | 是否默认插件 |
PUBLISHER | String | 发布者 |
REPOSITORY_HASH_ID | String | 代码库 HashId |
2.3 插件状态流转
enum class AtomStatusEnum(val status: Int) {
INIT(0), // 初始化
COMMITTING(1), // 提交中
BUILDING(2), // 构建中
BUILD_FAIL(3), // 构建失败
TESTING(4), // 测试中
AUDITING(5), // 审核中
AUDIT_REJECT(6), // 审核驳回
RELEASED(7), // 已发布
GROUNDING_SUSPENSION(8), // 上架中止
UNDERCARRIAGING(9), // 下架中
UNDERCARRIAGED(10), // 已下架
}
┌─────────────────────────────────────────────────────────────────┐
│ 插件状态流转图 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ INIT ──► COMMITTING ──► BUILDING ──► TESTING ──► AUDITING │
│ │ │ │
│ ▼ ▼ │
│ BUILD_FAIL AUDIT_REJECT │
│ │ │
│ ▼ │
│ RELEASED │
│ │ │
│ ▼ │
│ UNDERCARRIAGING │
│ │ │
│ ▼ │
│ UNDERCARRIAGED │
│ │
└─────────────────────────────────────────────────────────────────┘
2.4 插件分类
// 插件大类
enum class AtomTypeEnum(val type: Int) {
SELF_DEVELOPED(0), // 自研
THIRD_PARTY(1), // 第三方
}
// Job 类型
enum class JobTypeEnum(val type: String) {
AGENT("AGENT"), // 有构建环境
AGENT_LESS("AGENT_LESS"), // 无构建环境
}
三、核心数据库表
3.1 插件相关表
| 表名 | 说明 | 核心字段 |
|---|---|---|
T_ATOM | 插件主表 | ATOM_CODE, NAME, VERSION, ATOM_STATUS, LATEST_FLAG |
T_ATOM_ENV_INFO | 插件执行环境 | ATOM_ID, PKG_PATH, LANGUAGE, TARGET |
T_ATOM_FEATURE | 插件特性 | ATOM_CODE, VISIBILITY_LEVEL, YAML_FLAG, QUALITY_FLAG |
T_ATOM_BUILD_INFO | 插件构建信息 | LANGUAGE, SCRIPT, SAMPLE_PROJECT_PATH |
T_ATOM_VERSION_LOG | 版本日志 | ATOM_ID, RELEASE_TYPE, CONTENT |
T_ATOM_LABEL_REL | 插件标签关联 | ATOM_ID, LABEL_ID |
T_ATOM_OFFLINE | 插件下架记录 | ATOM_CODE, EXPIRE_TIME, STATUS |
3.2 模板相关表
| 表名 | 说明 | 核心字段 |
|---|---|---|
T_TEMPLATE | 模板主表 | TEMPLATE_CODE, TEMPLATE_NAME, VERSION, TEMPLATE_STATUS |
T_TEMPLATE_CATEGORY_REL | 模板分类关联 | TEMPLATE_ID, CATEGORY_ID |
T_TEMPLATE_LABEL_REL | 模板标签关联 | TEMPLATE_ID, LABEL_ID |
3.3 镜像相关表
| 表名 | 说明 | 核心字段 |
|---|---|---|
T_IMAGE | 镜像主表 | IMAGE_CODE, IMAGE_NAME, VERSION, IMAGE_STATUS |
T_IMAGE_CATEGORY_REL | 镜像分类关联 | IMAGE_ID, CATEGORY_ID |
T_IMAGE_LABEL_REL | 镜像标签关联 | IMAGE_ID, LABEL_ID |
3.4 通用表
| 表名 | 说明 |
|---|---|
T_CLASSIFY | 分类表 |
T_CATEGORY | 范畴表 |
T_LABEL | 标签表 |
T_STORE_MEMBER | 组件成员表 |
T_STORE_PROJECT_REL | 组件项目关联表 |
T_STORE_COMMENT | 评论表 |
T_STORE_COMMENT_REPLY | 评论回复表 |
T_STORE_COMMENT_PRAISE | 评论点赞表 |
T_STORE_STATISTICS | 统计表 |
T_STORE_APPROVE | 审批表 |
T_STORE_SENSITIVE_API | 敏感 API 表 |
T_STORE_SENSITIVE_CONF | 敏感配置表 |
3.5 容器编译环境表
| 表名 | 说明 |
|---|---|
T_APPS | 编译环境信息表 |
T_APP_ENV | 编译环境变量表 |
T_APP_VERSION | 编译环境版本表 |
T_CONTAINER | 容器信息表 |
T_BUILD_RESOURCE | 构建资源表 |
四、分层架构
┌─────────────────────────────────────────────────────────────────────────┐
│ 请求入口 │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ API 层 (api-store) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │UserMarket │ │ServiceAtom │ │UserTemplate │ │UserImage │ │
│ │AtomResource │ │Resource │ │Resource │ │Resource │ │
│ │(用户插件管理) │ │(服务间调用) │ │(模板管理) │ │(镜像管理) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │UserAtom │ │OpAtom │ │UserStore │ │
│ │ReleaseRes │ │Resource │ │MemberRes │ │
│ │(插件发布) │ │(运维管理) │ │(成员管理) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ 业务层 (biz-store) │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ 插件服务 (atom/service/) │ │
│ │ MarketAtomService - 插件市场服务 │ │
│ │ AtomReleaseService - 插件发布服务 │ │
│ │ AtomService - 插件基础服务 │ │
│ │ MarketAtomEnvService - 插件环境服务 │ │
│ │ MarketAtomArchiveService - 插件归档服务 │ │
│ └─────────────────────────────────────────────────────
---
*Content truncated.*
More by TencentBlueKing
View all skills by TencentBlueKing →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversQdrant is a powerful vector database for AI systems to store and retrieve vector-based memories with advanced vector sea
Context Portal: Manage project memory with a database-backed system for decisions, tracking, and semantic search via a k
Use Firebase to integrate Firebase Authentication, Firestore, and Storage for seamless backend services in your apps.
Discover Browser MCP on the Chrome Web Store—a powerful Chrome extension for real-time web interaction, markdown, CSS ch
LibSQL Memory offers a persistent memory database using LibSQL to store and retrieve knowledge graph entities and relati
Knowledge Graph: persistent local memory for Claude that stores entities, observations and relations to enable structure
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.