Skip to content
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

Clean Before Checkout #220

Merged
merged 1 commit into from Apr 10, 2014
Merged

Clean Before Checkout #220

merged 1 commit into from Apr 10, 2014

Conversation

ds2wang
Copy link

@ds2wang ds2wang commented Apr 3, 2014

Added functionality to allow clean before checkout. You can now select the option "Clean before checkout" when adding additional behaviors. Test is also added to verify the functionality.

@cloudbees-pull-request-builder

plugins » git-plugin #326 SUCCESS
This pull request looks good

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@MarkEWaite
Copy link
Contributor

Can you further describe the cases where you need a clean before checkout, compared to the current "clean" that is already available in the plugin?

@rsennewald
Copy link

@MarkEWaite, this functionality is useful for the scenario where there is modified data in the local repo, and you're unable to checkout anything until you perform a git clean first. If we use "Clean After Checkout", the job fails when performing the git checkout because there are locally modified files, and thus it never is able to get to the clean (which is scheduled to occur after the checkout - which failed). Doing the clean before the checkout is what we needed. If your still curious, please email me directly and I can go more into depth but hopefully this suffices.

@cloudbees-pull-request-builder

plugins » git-plugin #335 SUCCESS
This pull request looks good

@ds2wang
Copy link
Author

ds2wang commented Apr 4, 2014

I have made the suggested changes
the .DS_Store was an invisible file and I didn't know it was included in the commit, I have removed it.
The author is corrected.

@MarkEWaite
Copy link
Contributor

Unfortunately, your modification leaves the commit in place which added the binary file, then removes that binary file in a later commit.

I'd rather not have the master git-client-plugin contain a binary file of unknown origin, even for a few commits. Can you rebase to completely remove that binary file from the history?

@MarkEWaite
Copy link
Contributor

Can you describe in more detail the specific problem you're trying to address?

I attempted to create a Jenkins job which would fail to checkout without a clean before checkout. I couldn't find a case where the checkout failed due to clean not being executed before checkout.

It would also make it simpler for me if you provided that description in a bug report through the Jenkins JIRA instance.

@cloudbees-pull-request-builder

plugins » git-plugin #337 UNSTABLE
Looks like there's a problem with this pull request

@rsennewald
Copy link

Hi @MarkEWaite, I've tracked the issue here: https://issues.jenkins-ci.org/browse/JENKINS-22510. Let me know if you have a better suggestion, but I've looked through other alternatives and this seems to be the best I can think of.

@ds2wang
Copy link
Author

ds2wang commented Apr 5, 2014

Hi, I have addressed your suggestions and the binary file is no longer in the history

@cloudbees-pull-request-builder

plugins » git-plugin #338 SUCCESS
This pull request looks good

@MarkEWaite MarkEWaite mentioned this pull request Apr 5, 2014
@MarkEWaite
Copy link
Contributor

Is the use case needed in "clean before checkout" also covered by the "switch branches before checkout" use case proposed in #221 ? Or are there other cases (besides switching from one branch to another) where a clean is needed prior to checkout?

@MarkEWaite MarkEWaite merged commit fb12fed into jenkinsci:master Apr 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants