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

don't use shallow cloning when using merge-before-build #330

Merged
merged 1 commit into from
Aug 18, 2016

Conversation

dirk-thomas
Copy link
Member

Based on the discussion in http://discourse.ros.org/t/clone-depth-for-pr-devel-jobs/419 about failing PR jobs.

Consider the following scenario:

  • a job uses a shallow clone as well as "merge before build" (which currently all PR jobs do)
  • the branch is not built on top of the latest master
  • a newer version of the Jenkins Git plugin actually applies the depth option for the shallow clone correctly

The "merge before build" fails since it doesn't have enough history to determine how to perform the merge. Since we can't set a depth which will work in all cases this patch disables the use of shallow clone for the case of PR jobs. Other jobs which don't use "build before merge" can continue to use shallow clones.

@dirk-thomas dirk-thomas self-assigned this Aug 18, 2016
@tfoote
Copy link
Member

tfoote commented Aug 18, 2016

+1

Might we want to keep the block though and disable the shallow clone conditionally. And while we're here stop pulling tags since we're not using them?

@dirk-thomas
Copy link
Member Author

dirk-thomas commented Aug 18, 2016

devel jobs might use tags and we can't check if the passed ref is one or not.

I am not sure if the no-tags option for PR jobs is worth it. I don't expect it to save noticeable data.

@dirk-thomas dirk-thomas merged commit d6a4002 into master Aug 18, 2016
@dirk-thomas dirk-thomas deleted the no_shallow_when_merge branch August 18, 2016 18:05
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.

2 participants