-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
I want to enable the lightweight checkout for jobs which verify a Gerrit change. A change in Gerrit is accessed by the refspec refs/changes/id/change/patchset on the remote, e.g. refs/changes/21/12345/11. The SCM configuration uses this refspec in combination with the branch specifier "FETCH_HEAD". Unfortunatley the lightweight checkout is not supported for this configuration. Instead the entire source tree is checked-out on the controller to retrieve the pipeline file. It seems that currently only a branch or a tag are supported.
Furthermore I have the additional requirement to checkout a specific revision instead of the branch head. Here we use the refspec to fetch a given branch and use a commit hash as the branch specifier.
So it would desirable to enhance the lightweight checkout to fetch a given refspec and then read the pipeline file from the branch specifier. The current behavior is used if no refspec is given.
Both can be achieved by tweaking the GitSCMFileSystem implementation. I will provide a PR for this issue.
- causes
-
JENKINS-70155 ReadTrusted fails when using Pipeline from SCM with a specific commit / Lightweight checkout fails when specifying single commit
- Open