fix(ci): keep Jenkins boolean continuations parseable
This commit is contained in:
+7
-7
@@ -76,8 +76,8 @@ pipeline {
|
||||
if (!serviceModules.contains(service)) {
|
||||
error("无法从 Job 名称 ${env.JOB_BASE_NAME} 识别服务;名称必须以以下服务之一结尾: ${serviceModules.join(', ')}")
|
||||
}
|
||||
boolean deployBothBridges = service == 'event-bridge-service'
|
||||
&& imageTag?.endsWith('-both')
|
||||
boolean deployBothBridges = service == 'event-bridge-service' &&
|
||||
imageTag?.endsWith('-both')
|
||||
if (deployBothBridges) {
|
||||
imageTag = imageTag.substring(0, imageTag.length() - '-both'.length())
|
||||
}
|
||||
@@ -105,8 +105,8 @@ pipeline {
|
||||
if (!['BOTH', 'SELECT', 'CN', 'OVERSEAS'].contains(bridgeRegion)) {
|
||||
error('EVENT_BRIDGE_REGION 只能为 BOTH、CN 或 OVERSEAS')
|
||||
}
|
||||
if ((deployBothBridges || ['BOTH', 'SELECT'].contains(bridgeRegion))
|
||||
&& !['development', 'test'].contains(params.ENVIRONMENT)) {
|
||||
if ((deployBothBridges || ['BOTH', 'SELECT'].contains(bridgeRegion)) &&
|
||||
!['development', 'test'].contains(params.ENVIRONMENT)) {
|
||||
error('事件桥 BOTH 仅支持开发或测试环境;预发布和生产必须明确选择 CN 或 OVERSEAS')
|
||||
}
|
||||
}
|
||||
@@ -202,9 +202,9 @@ pipeline {
|
||||
try {
|
||||
unstash 'deployment-files'
|
||||
echo "在目标节点 ${env.NODE_NAME} 本机部署到 ${params.ENVIRONMENT}"
|
||||
List bridgeRegions = env.RESOLVED_SERVICE == 'event-bridge-service'
|
||||
&& (env.DEPLOY_BOTH_EVENT_BRIDGES == 'true'
|
||||
|| ['BOTH', 'SELECT'].contains(params.EVENT_BRIDGE_REGION))
|
||||
List bridgeRegions = (env.RESOLVED_SERVICE == 'event-bridge-service' &&
|
||||
(env.DEPLOY_BOTH_EVENT_BRIDGES == 'true' ||
|
||||
['BOTH', 'SELECT'].contains(params.EVENT_BRIDGE_REGION)))
|
||||
? ['CN', 'OVERSEAS']
|
||||
: [params.EVENT_BRIDGE_REGION]
|
||||
withCredentials([
|
||||
|
||||
Reference in New Issue
Block a user