-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support shallow clone in multibranch Pipeline and resolveScm #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.
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