From d31a28178eb29e0ada12bea9f7c328eeb6569dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8E=86=E5=86=B0=E9=83=81-hermes=E7=89=88?= Date: Wed, 6 May 2026 14:23:48 +0800 Subject: [PATCH] ci: shallow clone production Jenkins checkouts --- jenkins/Jenkinsfile.production-api-build | 5 ++++- jenkins/Jenkinsfile.production-full-build-and-deploy | 5 ++++- jenkins/Jenkinsfile.production-stdb-module-build | 5 ++++- jenkins/Jenkinsfile.production-web-build | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/jenkins/Jenkinsfile.production-api-build b/jenkins/Jenkinsfile.production-api-build index 317c610a..120b29ce 100644 --- a/jenkins/Jenkinsfile.production-api-build +++ b/jenkins/Jenkinsfile.production-api-build @@ -37,7 +37,10 @@ pipeline { $class: 'GitSCM', branches: [[name: "*/${params.SOURCE_BRANCH}"]], doGenerateSubmoduleConfigurations: false, - extensions: [[$class: 'CleanBeforeCheckout']], + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', shallow: true, depth: 1, noTags: true, timeout: 30], + ], userRemoteConfigs: [[url: "${GIT_REMOTE_URL}"]], ]) sh ''' diff --git a/jenkins/Jenkinsfile.production-full-build-and-deploy b/jenkins/Jenkinsfile.production-full-build-and-deploy index 87ecbb2b..a8a76878 100644 --- a/jenkins/Jenkinsfile.production-full-build-and-deploy +++ b/jenkins/Jenkinsfile.production-full-build-and-deploy @@ -45,7 +45,10 @@ pipeline { $class: 'GitSCM', branches: [[name: "*/${params.SOURCE_BRANCH}"]], doGenerateSubmoduleConfigurations: false, - extensions: [[$class: 'CleanBeforeCheckout']], + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', shallow: true, depth: 1, noTags: true, timeout: 30], + ], userRemoteConfigs: [[url: "${GIT_REMOTE_URL}"]], ]) sh ''' diff --git a/jenkins/Jenkinsfile.production-stdb-module-build b/jenkins/Jenkinsfile.production-stdb-module-build index 75a07adf..aae1fbe8 100644 --- a/jenkins/Jenkinsfile.production-stdb-module-build +++ b/jenkins/Jenkinsfile.production-stdb-module-build @@ -38,7 +38,10 @@ pipeline { $class: 'GitSCM', branches: [[name: "*/${params.SOURCE_BRANCH}"]], doGenerateSubmoduleConfigurations: false, - extensions: [[$class: 'CleanBeforeCheckout']], + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', shallow: true, depth: 1, noTags: true, timeout: 30], + ], userRemoteConfigs: [[url: "${GIT_REMOTE_URL}"]], ]) powershell ''' diff --git a/jenkins/Jenkinsfile.production-web-build b/jenkins/Jenkinsfile.production-web-build index 460a8cd7..1302e380 100644 --- a/jenkins/Jenkinsfile.production-web-build +++ b/jenkins/Jenkinsfile.production-web-build @@ -33,7 +33,10 @@ pipeline { $class: 'GitSCM', branches: [[name: "*/${params.SOURCE_BRANCH}"]], doGenerateSubmoduleConfigurations: false, - extensions: [[$class: 'CleanBeforeCheckout']], + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', shallow: true, depth: 1, noTags: true, timeout: 30], + ], userRemoteConfigs: [[url: "${GIT_REMOTE_URL}"]], ]) sh '''