- Home
- Skills
- Tencentblueking
- Bk Ci
- Process Module Architecture
process-module-architecture_skill
- Kotlin
2.5k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill tencentblueking/bk-ci --skill process-module-architecture- SKILL.md35.2 KB
Overview
This skill gives a concise architecture overview of the Process module that powers pipeline orchestration, scheduling, and execution in a CI/CD platform. It summarizes submodules, layered responsibilities, core data flows (pipeline CRUD, build lifecycle), and the event-driven execution path. Use it to orient development, debugging, or design changes to pipeline core logic.
How this skill works
The skill inspects the module split (api-process, biz-process, biz-base, biz-engine, model-process) and explains how requests travel from API entry through facade and engine services into the control layer. It maps the build lifecycle: triggers → interceptor chain → runtime service → event dispatcher → listeners → engine control (start → stage → container → task → end). It highlights DAO interactions and the RabbitMQ-based event dispatch used to decouple execution stages.
When to use it
- Developing or extending pipeline CRUD and template APIs
- Understanding or modifying build execution and scheduling logic
- Designing or refactoring engine control or task orchestration components
- Implementing event-driven listeners or message dispatch flows
- Diagnosing runtime issues in build start, stage, or task control paths
Best practices
- Read the overview first, then open the detailed layer document relevant to your change (API, service, engine, DAO, event).
- Keep facade services thin: coordinate validations, permissions, and model checks; push heavy orchestration to engine/biz-base services.
- Preserve the interceptor chain for global policies (locks, queueing, timer checks) to avoid duplicating controls across triggers.
- Use events to decouple synchronous request handling from long-running engine work; prefer durable messaging for build-critical events.
- Limit direct DB changes; prefer existing DAO services and jOOQ models to maintain schema consistency.
Example use cases
- Add a new webhook trigger that creates builds and flows through the interceptor chain into runtime service.
- Change concurrency policy: implement or modify a queue interceptor to alter parallel build limits.
- Extend an engine control (e.g., ContainerControl) to support new container lifecycle signals and agent startup events.
- Add a listener for custom build metrics that consumes PipelineBuildFinish events and forwards metrics to observability.
- Migrate part of pipeline state to a new table: update DAO, service layer, and ensure event listeners still find runtime state.
FAQ
biz-base (Engine Service layer) holds core orchestration and runtime services; biz-engine implements control-level scheduling and task controllers.
How are long-running build operations decoupled from API requests?
Build starts are persisted by runtime services and then dispatched as events (RabbitMQ) to listeners and engine control layers for asynchronous execution.
Where should permission and model validation run?
Run permission checks and model validation in the Facade layer before delegating to repository and engine services to ensure correctness early.