git-client-plugin
git-client-plugin copied to clipboard
[JENKINS-64844] Provide credentials during checkout
JENKINS-64844 - Provide credentials during checkout
Start support for partially cloned repos
This is a first draft for review to allow to perform checkout using credentials as required for instance when using a blobless clone. Hints about a better way to retrieve the checkout url or to the kind of unit tests that would be possible are welcome.
Checklist
- [x] I have read the CONTRIBUTING doc
- [x] I have referenced the Jira issue related to my changes in one or more commit messages
- [ ] I have added tests that verify my changes
- [x] Unit tests pass locally with my changes
- [x] I have added documentation as necessary
- [x] No Javadoc warnings were introduced with my changes
- [x] No spotbugs warnings were introduced with my changes
- [x] I have interactively tested my changes
Types of changes
What types of changes does your code introduce?
- [x] New feature (non-breaking change which adds functionality)
Further comments
This is not a complete support for blobless clone, just enough for our case (checkout scm occurs on Kubernetes in an image already containing a max one day old blobless clone of the repo). If something more complete is required to get this support integrated in the code base, please give me some advice on it.