[DO NOT MERGE] Use a shallow git clone on Jenkins when possible for main build#24201
[DO NOT MERGE] Use a shallow git clone on Jenkins when possible for main build#24201apupier wants to merge 1 commit into
Conversation
|
before merging I would like to test it on the CI by changing manually. I will likely do it tomorrow |
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
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 63M and gain few minutes to the build too. Co-authored-by: IBM Bob IDE 1.0.3 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
91844e9 to
8aa8c31
Compare
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for working on this, @apupier — reducing the .git footprint from 1.4GB to ~63MB per workspace is a meaningful improvement for the Jenkins nodes.
A few observations from reviewing the diff:
Sonar/coverage case is correctly handled — the full clone exception for ubuntu-avx + jdk_21_latest ensures SonarCloud's SCM blame sensor (which uses git blame) will continue to work. Good catch.
No git-history-dependent Maven plugins found — I checked the root pom.xml for plugins like git-commit-id-plugin or buildnumber-maven-plugin and found none, so depth: 1 won't break the Maven build itself.
Minor observation on Jenkinsfile.jdk26 — this file unconditionally uses shallow clone for all platforms, which is safe since there's no Sonar/coverage stage. If Sonar analysis is ever added for JDK 26 builds, someone would need to add the full-clone exception there too. A brief comment noting this could help future maintainers.
Indentation in Jenkinsfile.jdk26 — the checkout([...]) block has slightly inconsistent indentation compared to the surrounding code and the main Jenkinsfile change. Very minor/cosmetic.
Overall the approach looks sound. I see you want to validate on Jenkins first before merging — makes sense given this is infrastructure.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
| ], | ||
| userRemoteConfigs: scm.userRemoteConfigs | ||
| ]) | ||
| } |
There was a problem hiding this comment.
Nit: the indentation here is slightly off compared to the surrounding steps block and the equivalent change in the main Jenkinsfile. The $class and its children have extra leading spaces.
|
tested with JDk 26, the exact git commands used on Jenkisn are: which is fecthing all branches, causing the .git to be at 376M, instead of 63M with a pure remains the conditional to test too on the Camel main repo |
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 63M and gain few minutes to the build too.
Co-authored-by: IBM Bob IDE 1.0.3
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.