This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new f6cc3c230f9b Use a shallow git clone on Jenkins when possible for main
build
f6cc3c230f9b is described below
commit f6cc3c230f9b84b6c2ecc6b22a46acf36c084da0
Author: Aurélien Pupier <[email protected]>
AuthorDate: Tue Jun 23 16:19:48 2026 +0200
Use a shallow git clone on Jenkins when possible for main build
there are currently issues with disk space available on the Jenkins
nodes.
Camel is one of the most consuming one. Each of its workspace for Camel
core is taking 4.4G, it includes 1.4G for the .git folder.
Using a shallow clone should reduce the 1.4G to 365M and gain few
minutes
to the build too.
it is still fetching info for all branches. to be improved later on if
we find how (to drop from 365M to 65M)
note that this backport adapts to the JDk used for Sonar (21 vs 17)
Co-authored-by: IBM Bob IDE 1.0.3
Signed-off-by: Aurélien Pupier <[email protected]>
---
Jenkinsfile | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index d5cd170d3901..3f759c3e6297 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -127,7 +127,24 @@ pipeline {
steps {
cleanWs()
sh 'rm -rvf
/home/jenkins/.m2/repository/org/apache/camel'
- checkout scm
+ script {
+ // Use full clone for JDK 17 on ubuntu-avx
(needed for Sonar analysis)
+ // Use shallow clone for all other combinations
+ if ("${PLATFORM}" == "ubuntu-avx" &&
"${JDK_NAME}" == "jdk_17_latest") {
+ echo "Using full clone for
${PLATFORM}-${JDK_NAME} (required for code coverage and Sonar)"
+ checkout scm
+ } else {
+ echo "Using shallow clone for
${PLATFORM}-${JDK_NAME}"
+ checkout([
+ $class: 'GitSCM',
+ branches: scm.branches,
+ extensions: [
+ [$class: 'CloneOption', depth: 1,
noTags: true, shallow: true]
+ ],
+ userRemoteConfigs:
scm.userRemoteConfigs
+ ])
+ }
+ }
}
}