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/) +})