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
Conversation
plugins » git-plugin #326 SUCCESS |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
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? |
@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. |
plugins » git-plugin #335 SUCCESS |
I have made the suggested changes |
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? |
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. |
plugins » git-plugin #337 UNSTABLE |
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. |
Hi, I have addressed your suggestions and the binary file is no longer in the history |
plugins » git-plugin #338 SUCCESS |
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? |
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.