-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support shallow clone in GitSCMSource #3896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
MarkEWaite
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Needs automated tests that confirm the feature works as expected. Needs documentation that describes it so that users have an example they can use.
Pipeline syntax generate code resolveScm with cloneOption trait. Without these chnages trait will be ignored. |
That is certainly necessary, but I also like to include documentation in the README. People do not always use the syntax generator. |
bedab4f to
9e1906e
Compare
|
Seems it's enough) |
MarkEWaite
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the documentation. It highlights that the documentation needs a significant addition to describe the differences between a single Pipeline and a Pipeline defined within a multibranch project.
|
It is much better for me as a reviewer if you don't force push new changes once we've started reviewing. When a commit is force pushed, the comments may be dissociated from the current push. It is better for me as a reviewer if you push new commits. When the review is complete, it can be squash merged into the master branch before release. |
i see. will create new commits |
MarkEWaite
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to remove the variable.
MarkEWaite
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to use Java 17 pattern matching instanceof instead of casting the result.
|
@MarkEWaite still checking? |
|
@MarkEWaite ping |
Thanks. The change needs much more documentation. I won't have time to create that documentation for at least 2-3 weeks. The documentation you've proposed needs to be expanded with explanatory paragraphs and it needs to move to the end of the examples section as its own independent example. This addition is not another case of shallow checkout, it is a distinct use case that needs to be separately documented. |
i see. thanks. something like 2080375 needed? |
That is a beginning, but it needs a significant addition to describe the differences between a single Pipeline and a Pipeline defined within a multibranch project and how resolveScm can be used to extract information from a previous checkout in the Pipeline. The current phrasing does not mention why the user would use it or more details about the context for its use. There is no explanation of the concepts involved in resolveScm and no link to more detailed documentation of resolveScm. |
yes. i fix it to some extent. for now i don't know how better rewrite this) |
in current state
CloneOptionTraitignored, this PR allow set depth when you need find branchTesting done
cheked locally in pipeline with
resolveScm([ ignoreErrors: false, source : gitSource( credentialsId: 'git-cred', remote: 'https://....', traits: [cloneOption(cloneOption(depth: 1, shallow: true)), gitBranchDiscovery()] ), targets : ['main', 'master'] ])Submitter checklist