You can not really clone specific directory from git repository, you need to download whole repository. But, you can checkout specific folder or file from your commit or branch.
git checkout branch_or_version -- path/file
To checkout specific file from the branch.
git checkout HEAD -- main.c
to checkout specific folder from the commit.
git checkout e5224c883a490f11c1f1cb2b2f2aae9d4ce17ac9 /path/to/directory
To checkout specific folder or file on Jenkins, you can utilize MSEM Plugin. In that you can define your directory or file into sparse checkout field.