From cee3ee07a8acbab89d38f3d5ae1f85d717d60e46 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Sat, 22 Aug 2026 11:45:14 +0800 Subject: [PATCH] fix(ci): schedule coordinator on builder agents --- Jenkinsfile | 2 +- scripts/controller-pipeline-contract.test.mjs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 07fb4d420..f75cae1f8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,7 @@ def downstreamJobPrefixForJob(String jobBaseName) { pipeline { // 总控流水线只识别变更并调度独立的服务 Job;实际 Maven、镜像和部署在 Jenkinsfile.service 中完成。 - agent any + agent { label 'java-builder' } options { disableConcurrentBuilds() diff --git a/scripts/controller-pipeline-contract.test.mjs b/scripts/controller-pipeline-contract.test.mjs index bcaee0d4f..48a20a75c 100644 --- a/scripts/controller-pipeline-contract.test.mjs +++ b/scripts/controller-pipeline-contract.test.mjs @@ -5,6 +5,11 @@ import test from 'node:test' const pipeline = (await readFile(new URL('../Jenkinsfile', import.meta.url), 'utf8')) .replaceAll('\r\n', '\n') +test('coordinator runs only on the shared Java builder pool', () => { + assert.match(pipeline, /agent \{ label 'java-builder' \}/) + assert.doesNotMatch(pipeline, /agent any/) +}) + test('AUTO detects database migrations without expanding them to all services', () => { assert.match(pipeline, /def databaseMigrationPaths = \['deploy\/sql\/'\]/) assert.match(pipeline, /!databaseMigration && commonPaths\.any/)