diff --git a/Jenkinsfile b/Jenkinsfile index e9344b2..4124e1b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -74,7 +74,7 @@ pipeline { steps { withCredentials([string(credentialsId: 'ACR_PASSWORD', variable: 'ACR_PASS')]) { script { - def serviceVersions = new groovy.json.JsonSlurper().parseText(env.SERVICE_VERSIONS_JSON) + def serviceVersions = new groovy.json.JsonSlurperClassic().parseText(env.SERVICE_VERSIONS_JSON) for (entry in serviceVersions) { def svc = entry.key def ver = entry.value @@ -107,7 +107,7 @@ pipeline { lock('prod-deploy') { withCredentials([sshUserPrivateKey(credentialsId: 'PROD_SSH_KEY', keyFileVariable: 'SSH_KEY')]) { script { - def serviceVersions = new groovy.json.JsonSlurper().parseText(env.SERVICE_VERSIONS_JSON) + def serviceVersions = new groovy.json.JsonSlurperClassic().parseText(env.SERVICE_VERSIONS_JSON) for (entry in serviceVersions) { def svc = entry.key def latestImage = "${ACR_REGISTRY}/${ACR_NAMESPACE}/${svc}:latest" @@ -163,7 +163,7 @@ print('versions.json updated, platformVersion=' + d.get('platformVersion', '')) stage('Commit Versions') { steps { script { - def serviceVersions = new groovy.json.JsonSlurper().parseText(env.SERVICE_VERSIONS_JSON) + def serviceVersions = new groovy.json.JsonSlurperClassic().parseText(env.SERVICE_VERSIONS_JSON) def versionFiles = serviceVersions.keySet().collect { "VERSION.${it}" }.join(' ') def summary = serviceVersions.collect { svc, ver -> "${svc}=${ver}" }.join(', ') bat """ @@ -182,7 +182,7 @@ print('versions.json updated, platformVersion=' + d.get('platformVersion', '')) post { success { script { - def serviceVersions = new groovy.json.JsonSlurper().parseText(env.SERVICE_VERSIONS_JSON ?: '{}') + def serviceVersions = new groovy.json.JsonSlurperClassic().parseText(env.SERVICE_VERSIONS_JSON ?: '{}') def summary = serviceVersions.collect { svc, ver -> "${svc}:${ver}" }.join(', ') bat "chcp 65001 >nul && echo ✅ 构建部署成功 — ${summary}" }