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

Git dependency and git modules #914

Closed
metacoma opened this issue Dec 23, 2022 · 0 comments · Fixed by #987
Closed

Git dependency and git modules #914

metacoma opened this issue Dec 23, 2022 · 0 comments · Fixed by #987
Assignees
Labels
enhancement enhancement to an existing feature feature

Comments

@metacoma
Copy link
Contributor

Describe the bug/feature
As i can understand, at this moment there is no way to clone git repository with git submodules?

To Reproduce

  1. define dependency, for example, kapicorp/kapitan git repository
---
parameters: 
  kapitan:
    dependencies:
       - type: git 
         output_path: files/git/github/kapicorp/kapitan
         source: https://github.com/kapicorp/kapitan
         ref: master
$ kapitan compile --fetch
  1. Try to open .gitmodules file https://github.com/kapicorp/kapitan/blob/master/.gitmodules
$ ls -ltr files/git/github/kapicorp/kapitan/.gitmodule
ls: cannot access 'files/git/github/kapicorp/kapitan/.gitmodule': No such file or directory

Expected behavior
kapicorp/kapitan github repository must be cloned with git modules (in this case with https://github.com/kapicorp/reclass.git)

Additional context
As far as i understand, kapitan uses GitPython library to clone git repos. Probably, the properly submodule handling in GitPython will helps https://gitpython.readthedocs.io/en/0.3.3/tutorial.html#submodule-handling

Also, submodule option might be added into dependency definition, like

---
parameters: 
  kapitan:
    dependencies:
       - type: git
         submodule: True 
         output_path: files/git/github/kapicorp/kapitan
         source: https://github.com/kapicorp/kapitan
         ref: master
@MatteoVoges MatteoVoges self-assigned this Apr 4, 2023
@MatteoVoges MatteoVoges added enhancement enhancement to an existing feature feature labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement to an existing feature feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants