Skip to content

Adds a flag to the clean after checkout and clean before checkout adv…#449

Closed
roguishmountain wants to merge 4 commits intojenkinsci:masterfrom
roguishmountain:submodule_clean
Closed

Adds a flag to the clean after checkout and clean before checkout adv…#449
roguishmountain wants to merge 4 commits intojenkinsci:masterfrom
roguishmountain:submodule_clean

Conversation

@roguishmountain
Copy link

…anced options

See bug report https://issues.jenkins-ci.org/browse/JENKINS-26660 for more details

@roguishmountain
Copy link
Author

Depends on jenkinsci/git-client-plugin#222

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as with jenkinsci/git-client-plugin#222

@MarkEWaite
Copy link
Contributor

I uploaded a build of required git client plugin build and the git plugin build.

The git client is based on the latest master branch. The git plugin is the latest master branch plus a browser guesser enhancement and a fix for a performance problem due to excessive calls to rev-parse.

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good in my interactive testing. Looking for further testing from @leandro-lucarella-sociomantic

@MarkEWaite
Copy link
Contributor

This pull request works well for Freestyle jobs.

It needs more work on the Pipeline portion of the implementation before it can be merged. The Pipeline syntax suggestions are not as tidy as they should be when submodule cleaning is enabled.

@leandro-lucarella-sociomantic

For what is worth (and sorry for the delay), the tests also were well on our side, but we didn't test with pipelines.

@akoeplinger
Copy link

What's the current status of this PR?

@akoeplinger
Copy link

@MarkEWaite is the Pipeline work the only remaining issue before this PR can be merged?

@MarkEWaite
Copy link
Contributor

@roguishmountain
Copy link
Author

@MarkEWaite the most recent commit fixes the pipeline syntax suggestions.

@MarkEWaite MarkEWaite added the Submodules Submodule handling label Dec 10, 2018
@MarkEWaite MarkEWaite added this to the 4.0 milestone Dec 11, 2018

f.entry(title:_("Clean submodules (Add additional -f flag)"), field:"cleanSubmodule") {
f.checkbox()
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A newline should be added here.


def f = namespace(lib.FormTagLib);

f.entry(title:_("Clean submodules (Add additional -f flag)"), field:"cleanSubmodule") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a "cligit" and "jgit" implementation. This comment about the -f flag is more or less only valid for the "cligit" implementation. But I am not sure what's the common way to deal with the implementation differences regarding user facing documentation in this plugin. @MarkEWaite what's your opinion?


private boolean cleanSubmodule;
@DataBoundConstructor
public CleanBeforeCheckout(final boolean cleanSubmodule) {
Copy link
Contributor

@darxriggs darxriggs Dec 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at https://jenkins.io/doc/developer/plugin-development/pipeline-integration/#constructor-vs-setters. I suggest to not add another constructor (this procedure is hard to maintain when more and more parameters are added) but to use a setter method annotated with @DataBoundSetter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roguishmountain did you have some time to look at this?

@@ -0,0 +1,8 @@
package hudson.plugins.git.extensions.impl.CleanBeforeCheckout;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semicolons are optional in Groovy and it is common to not use them.

@MarkEWaite MarkEWaite modified the milestones: 4.0, Later Jan 4, 2019
@MarkEWaite MarkEWaite modified the milestone: Later Mar 9, 2019
@MarkEWaite MarkEWaite closed this Mar 9, 2019
@leandro-lucarella-sociomantic

Was this resolved or abandoned?

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Apr 11, 2019

Neither resolved nor abandoned. I've assigned it to the milestone "Later" and closed the pull request for now. My priorities for development on the git plugin are:

  1. Resolve open blocking issues in the 4.0 milestone
  2. Complete git plugin 4.0 testing and release
  3. Resolve BuildData bloat - JENKINS-19022 as described in BuildData label
  4. Release git plugin version with BuildData bloat fix
  5. Improve notifyCommit handling as described in notifyCommit label
  6. Release git plugin version with notifyCommit improvements
  7. Improve submodule handling as described in submodules label
  8. Release git plugin version with submodule handling improvements
  9. Improve repository caching in the plugin as described in the caching label
  10. Release git plugin version with caching improvements
  11. Improve changelog handling based on pull requests in changelog label
  12. Release git plugin version with changelog improvements

Unless something else changes, I won't do further review on this change for a long time.


private boolean cleanSubmodule;
@DataBoundConstructor
public CleanCheckout(final boolean cleanSubmodule) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment on CleanBeforeCheckout.

@darxriggs
Copy link
Contributor

darxriggs commented Nov 18, 2019

@roguishmountain can you have a look at the review comments and reopen this pull request?

@slonopotamus
Copy link
Contributor

See #792

@MarkEWaite
Copy link
Contributor

Merged into master as #792 . Planned for release in git plugin 4.1.0

@MarkEWaite MarkEWaite removed this from the Later milestone Dec 20, 2019
@MarkEWaite MarkEWaite removed the Submodules Submodule handling label Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants