-
New Feature
-
Resolution: Duplicate
-
Major
Cloning full Git repository can take a long time (in my case over 10 minutes which results in timeout).
In the freestyle project I can specify additional clone options like shallow clone. Unfortunatelny I cannot do this in Multibranch Pipeline project with Jenkinsfile.
I've tried modifying scm.extensions using code like this:
@NonCPS def checkout_src() { def copt = new CloneOption(true, "", 999) def r = scm.extensions.add(copt) echo "${scm.extensions}" checkout scm scm.extensions.remove(copt) }
However when executed CloneOption is not added to extensions:
Extensions: [hudson.plugins.git.extensions.impl.BuildChooserSetting@87d105]
It would be nice if it was possible to add extensions to SCM via Jenkinsfile.
- duplicates
-
JENKINS-31924 GitSCMSource should offer extensions
- Closed