From 3b8b6f5aa22985175698e7afe33e158d97fefbcd Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 17 Sep 2026 16:01:00 +0800 Subject: [PATCH] ci: remove duplicate production deploy approval --- Jenkinsfile | 11 ----------- scripts/controller-pipeline-contract.test.mjs | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28574f7ef..b95e6abfa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -316,17 +316,6 @@ pipeline { } } - stage('生产环境部署确认(仅 production 执行)') { - when { - allOf { - expression { params.DEPLOY && env.RESOLVED_ENVIRONMENT == 'production' && env.NO_SERVICE_CHANGE != 'true' } - } - } - steps { - input message: "确认将 ${env.SELECTED_SERVICES} 的镜像 ${env.IMAGE_TAG} 分别部署到生产环境?", ok: '确认部署' - } - } - stage('Gateway 路由静态门禁') { when { expression { env.NO_SERVICE_CHANGE != 'true' } diff --git a/scripts/controller-pipeline-contract.test.mjs b/scripts/controller-pipeline-contract.test.mjs index 2dbda3f44..aafda41ed 100644 --- a/scripts/controller-pipeline-contract.test.mjs +++ b/scripts/controller-pipeline-contract.test.mjs @@ -60,3 +60,11 @@ test('coordinator defaults event bridge deployments to both non-production regio assert.match(pipeline, /service == 'event-bridge-service' \? params\.EVENT_BRIDGE_REGION : 'CN'/) assert.match(pipeline, /string\(name: 'EVENT_BRIDGE_REGION', value: downstreamBridgeRegion\)/) }) + +test('production deploy uses DEPLOY as the single explicit release switch', () => { + assert.match(pipeline, /booleanParam\(name: 'DEPLOY'/) + assert.match(pipeline, /test "\$\(git rev-parse HEAD\)" = "\$\(git rev-parse origin\/main\)"/) + assert.match(pipeline, /env\.RESOLVED_ENVIRONMENT == 'production' && params\.SKIP_TESTS/) + assert.doesNotMatch(pipeline, /input message:/) + assert.doesNotMatch(pipeline, /\u786e\u8ba4\u90e8\u7f72/) +}) -- 2.54.0