In a jenkinsfile, I have specified the folderName through SparseCheckoutPaths which I want to checkout. But I am getting a whole branch checkout instead.
Your syntax looks good, but, as seen in "jenkinsci/plugins/gitclient/CliGitAPIImpl.java", did you specify the right configuration?
private void sparseCheckout(@NonNull List paths) throws GitException, InterruptedException {
boolean coreSparseCheckoutConfigEnable;
try {
coreSparseCheckoutConfigEnable = launchCommand("config", "core.sparsecheckout").contains("true");
} catch (GitException ge) {
coreSparseCheckoutConfigEnable = false;
}
In other words, is git config core.sparsecheckout
equal to true
in the repo you are about to checkout?