feat(ci): Runner标签分层路由 - 测试/构建分机运行 #315

Merged
xiaoxia merged 3 commits from feat/runner-label-routing into develop 2026-07-14 14:56:09 +08:00
Owner

变更内容

9个Runner按标签分层,测试类与构建类Job分机运行,互不抢资源:

Runner分层

  • 6个新Runner(新CI服务器):加 ci-check 标签,专跑测试/检查类Job
  • 3个旧Runner(Gitea服务器):加 build-only 标签,专跑构建/部署类Job

Job路由调整

Job类型 旧配置 新配置 目标Runner
validate host [host, ci-check] 新Runner(6台)
unit-tests host [host, ci-check] 新Runner(6台)
integration-tests host [host, ci-check] 新Runner(6台)
frontend-lint host [host, ci-check] 新Runner(6台)
deploy-staging(构建+部署) saas [host, build-only] 旧Runner(3台)
staging-e2e saas [host, build-only] 旧Runner(3台)
staging-api-tests saas [host, build-only] 旧Runner(3台)
build-production-runtime-images saas [host, build-only] 旧Runner(3台)
deploy-production saas [host, build-only] 旧Runner(3台)
production-e2e saas [host, build-only] 旧Runner(3台)

收益

  • 构建不再排队:构建(CPU重)和测试(IO/内存重)分开,构建Job不会被测试Job占着Runner而排队
  • 并行度更高:4个测试Job可以在6台新Runner上同时跑,3个构建/部署Job在3台旧Runner上跑
  • 故障隔离:一组Runner出问题不会影响另一组
  • 兼容兜底:所有Job都带 host 标签,Runner标签配置好后自动分流

⚠️ 注意:此PR仅修改ci-cd.yml路由规则,Runner标签需通过服务器端配置添加。标签未配置前所有Job仍在原Runner上正常运行(因为都有host标签)。

## 变更内容 9个Runner按标签分层,测试类与构建类Job分机运行,互不抢资源: ### Runner分层 - **6个新Runner(新CI服务器)**:加 `ci-check` 标签,专跑测试/检查类Job - **3个旧Runner(Gitea服务器)**:加 `build-only` 标签,专跑构建/部署类Job ### Job路由调整 | Job类型 | 旧配置 | 新配置 | 目标Runner | |--------|--------|--------|------------| | validate | `host` | `[host, ci-check]` | 新Runner(6台) | | unit-tests | `host` | `[host, ci-check]` | 新Runner(6台) | | integration-tests | `host` | `[host, ci-check]` | 新Runner(6台) | | frontend-lint | `host` | `[host, ci-check]` | 新Runner(6台) | | deploy-staging(构建+部署) | `saas` | `[host, build-only]` | 旧Runner(3台) | | staging-e2e | `saas` | `[host, build-only]` | 旧Runner(3台) | | staging-api-tests | `saas` | `[host, build-only]` | 旧Runner(3台) | | build-production-runtime-images | `saas` | `[host, build-only]` | 旧Runner(3台) | | deploy-production | `saas` | `[host, build-only]` | 旧Runner(3台) | | production-e2e | `saas` | `[host, build-only]` | 旧Runner(3台) | ### 收益 - **构建不再排队**:构建(CPU重)和测试(IO/内存重)分开,构建Job不会被测试Job占着Runner而排队 - **并行度更高**:4个测试Job可以在6台新Runner上同时跑,3个构建/部署Job在3台旧Runner上跑 - **故障隔离**:一组Runner出问题不会影响另一组 - **兼容兜底**:所有Job都带 `host` 标签,Runner标签配置好后自动分流 > ⚠️ 注意:此PR仅修改ci-cd.yml路由规则,Runner标签需通过服务器端配置添加。标签未配置前所有Job仍在原Runner上正常运行(因为都有host标签)。
xiaoxia added 1 commit 2026-07-14 11:55:21 +08:00
feat(ci): Runner标签分层路由
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 31s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m16s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m17s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m22s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
350bc72fdd
- 测试类Job(validate/unit/integration/frontend-lint)路由到ci-check标签Runner
- 构建部署类Job路由到build-only标签Runner
- 保留host标签确保兼容
- 6个新Runner专跑测试,3个旧Runner专跑构建,互不抢资源
xiaoxia added 1 commit 2026-07-14 13:22:50 +08:00
chore: trigger ci - routing test
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 35s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m18s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m50s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m29s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
1effd36925
xiaoxia added 1 commit 2026-07-14 14:19:09 +08:00
chore: trigger CI for routing verification
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 30s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m5s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m11s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 2m1s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
fe47eb09d2
xiaoxia merged commit 08b51ffa1d into develop 2026-07-14 14:56:09 +08:00
Sign in to join this conversation.