Our project is huge and we would like to avoid cloning all git history.
Is it possible to git clone
passing depth=1
using checkout scm
in Jenkins?
I cannot find any documentation about how to configure SCM
or how to pass arguments, if possible.
Added:
Found the documentation
https://jenkins.io/doc/pipeline/steps/workflow-scm-step/#code-checkout-code-general-scm
Type: int
depth (optional)
Set shallow clone depth, so that git will only download recent history of the project, saving time and disk space when you just want to access the latest version of a repository.
but it's not clear how to pass it to checkout scm