puppetlabs / r10k

Smarter Puppet deployment
Other
799 stars 353 forks source link

R10k unable to handle submodules #675

Closed daveseff closed 1 year ago

daveseff commented 7 years ago

Our project needs the ability to pull in erb templates maintatined by another team. We have added this second repo as a submodule:

$ git add submodule otherteam:otherrepo  profiles/templates/otherteam
$ git commit -a -m 'added tesm templates'; git push

Running R10k on our puppetmaster isn't checking out the submodule and the target dir is empty.

scotje commented 7 years ago

@daveseff can you accomplish the same thing by adding the content to your Puppetfile with a custom install_path? https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#per-item-install-path

ghost commented 7 years ago

Is there no way to support submodules ? Would be realy nice to have that integrated

bittner commented 6 years ago

can you accomplish the same thing by adding the content to your Puppetfile with a custom install_path?

Clone the submodule separately via the Puppetfile?

That's certainly possible but terribly hacky. This approach cries for trouble. Submodules are referenced in the containing Git repo with a commit hash, which you have to then manually align with the reference in your Puppetfile.

EDIT: The per-item install-path only works with ... :drum: ... Puppet modules! If you have general Git submodules you have to do it "your way", manually.

Suggested Solution

It would be good if it were possible to specify explicitly that Git should be run with submodule update --init (or so), e.g. via

mod 'foobar',
  :git        => 'http://gitlab/foobar/puppet-foobar',
  :submodules => true

I don't see this in the examples.

vollmerk commented 6 years ago

My use case is related to Hiera Data, I'd like to sub-farm out sections of my Hiera data to other administrative groups - work around would be indeed install path with the Puppet file, but it's so much cleaner to have sub-modules, keep the fancy versioning footwork where it belongs in Git.

I found the following Puppet bug in Jira which wasn't encouraging, no reason for why it's "won't fix" https://tickets.puppetlabs.com/browse/RK-30?jql=text%20~%20%22submodule%22

olifre commented 6 years ago

That's indeed extremely annoying. I just voted for the bug in Jira, which seems open again, finally. Maybe other people in this thread could also vote on it?

luksi1 commented 5 years ago

Isn't this even more relevant now that plans and tasks are included in modules? I would like to be able to have a separat CI/CD process for my scripts that I would then add as submodules in our Puppet modules. In fact, without this feature, we would have to push in our code and then copy it over by hand to the module just for the r10k pipeline.

github-actions[bot] commented 3 years ago

This issue has been marked stale because it has had no activity for 60 days. The Puppet Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

vollmerk commented 3 years ago

This is still important to me.

Magisus commented 3 years ago

Agreed that we should support this. And it doesn't seems super hard to do so. Going to reopen the Jira ticket too, sorry for all the back-and-forth on tracking systems, the approach to working on this project has been going through a lot of iterations as our bandwidth and the level of community engagement changes.

github-actions[bot] commented 3 years ago

This issue has been marked stale because it has had no activity for 60 days. The Puppet Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

olifre commented 3 years ago

This is also still very relevant for me.

Magisus commented 3 years ago

Related Jira ticket: https://tickets.puppetlabs.com/browse/RK-30

github-actions[bot] commented 2 years ago

This issue has been marked stale because it has had no activity for 60 days. The Puppet Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

mwpower commented 2 years ago

I've got some hacks in place to manage some of this behaviour, but I'd like to get something proper in place.

Still relevant for me.

cyberscribe commented 2 years ago

This would indeed very useful for us too...

mwaggett commented 1 year ago

Hi @daveseff, thanks for opening this! r10k is now considered to be feature complete and we are unfortunately discontinuing development. As a result, we are closing all open issues and pull requests. I sincerely apologize that we’re unable to address this issue.