diff --git a/Jenkinsfile b/Jenkinsfile index b8084642e..a06ba1017 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -236,7 +236,7 @@ pipeline { : env.IMAGE_TAG String downstreamBridgeRegion = deployBothBridges ? 'CN' - : params.EVENT_BRIDGE_REGION + : (service == 'event-bridge-service' ? params.EVENT_BRIDGE_REGION : 'CN') echo "触发单服务 Job: ${jobName}" def downstreamBuild = build( job: jobName, diff --git a/scripts/controller-pipeline-contract.test.mjs b/scripts/controller-pipeline-contract.test.mjs index 2248b09e6..9ee3dd23c 100644 --- a/scripts/controller-pipeline-contract.test.mjs +++ b/scripts/controller-pipeline-contract.test.mjs @@ -49,5 +49,6 @@ test('coordinator defaults event bridge deployments to both non-production regio assert.match(pipeline, /事件桥 BOTH 仅支持开发或测试环境/) assert.match(pipeline, /String downstreamImageTag = deployBothBridges[\s\S]*?\? "\$\{env\.IMAGE_TAG\}-both"/) assert.match(pipeline, /String downstreamBridgeRegion = deployBothBridges[\s\S]*?\? 'CN'/) + assert.match(pipeline, /service == 'event-bridge-service' \? params\.EVENT_BRIDGE_REGION : 'CN'/) assert.match(pipeline, /string\(name: 'EVENT_BRIDGE_REGION', value: downstreamBridgeRegion\)/) })