git-client-plugin icon indicating copy to clipboard operation
git-client-plugin copied to clipboard

[JENKINS-64844] Provide credentials during checkout

Open mguillem opened this issue 1 year ago • 6 comments

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.

mguillem avatar Apr 18 '24 14:04 mguillem

@MarkEWaite can you give me some hints about the failures? mvn install is successful for me locally under linux (both with java 17 and java 21).

mguillem avatar Apr 22 '24 08:04 mguillem

Hi everyone,

Is there any news here yet? My employer would also be very interested in this extension. Thanks to @mguillem for providing this!

mischoem avatar May 06 '24 14:05 mischoem

Hi everyone,

Is there any news here yet? My employer would also be very interested in this extension. Thanks to @mguillem for providing this!

No news from me. I think that the change is moving on the correct path, since it is following the same pattern that was used to add credentials to the git lfs calls. Unfortunately, I don't have the time to do further research on the test failures. @mischoem if you would be willing to investigate the test failures or have someone from your company investigate the test failures, that would be a very good step.

@mischoem even if you can't investigate the test failures, it would be very good for you to deploy an incremental build of this pull request in your environment and share your results. That would give you immediate access to the feature and would provide feedback to me and other maintainers to confirm that the code is working as desired in production

MarkEWaite avatar May 06 '24 15:05 MarkEWaite

Hi everyone, Is there any news here yet? My employer would also be very interested in this extension. Thanks to @mguillem for providing this!

No news from me. I think that the change is moving on the correct path, since it is following the same pattern that was used to add credentials to the git lfs calls. Unfortunately, I don't have the time to do further research on the test failures. @mischoem if you would be willing to investigate the test failures or have someone from your company investigate the test failures, that would be a very good step.

@mischoem even if you can't investigate the test failures, it would be very good for you to deploy an incremental build of this pull request in your environment and share your results. That would give you immediate access to the feature and would provide feedback to me and other maintainers to confirm that the code is working as desired in production

A little feedback from my side: After testing it seems to work fine

mischoem avatar Jul 17 '24 07:07 mischoem

@MarkEWaite I've made a minimal change to the PR and the build is now green.

mguillem avatar Aug 13 '25 06:08 mguillem

@MarkEWaite is there anything that is missing to get this patch applied? Patching the plugin after each new release is quite tedious ;-)

mguillem avatar Sep 11 '25 09:09 mguillem