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

Add option to git clone local copy of repos instead of git archive | untar #151

Closed
DavidGamba opened this issue Sep 30, 2019 · 5 comments
Closed
Assignees

Comments

@DavidGamba
Copy link

This is related to #93 but the use case is to allow a local copy of the entire r10k module repos so that developers can work locally.

When using a development puppet master we then sync our changes to the puppet master and verify that they work.

Having a local clone is very helpful and currently we have a script that parses the Puppetfile and clones the repos but doesn't support all syntaxes. It would be great if g10k can support this.

@xorpaul xorpaul self-assigned this Dec 20, 2019
@xorpaul
Copy link
Owner

xorpaul commented Dec 20, 2019

Check out https://github.com/xorpaul/g10k/releases/tag/v0.8.9
and add clone_git_modules: true to your g10k config.

Then you should get a cloned git repository with the correct referenced module branch to your g10k basedir.

@DavidGamba
Copy link
Author

Thanks for the instructions and for implementing the feature. I have a ticket in my backlog to test it out.

Thanks for the awesome work with g10k. It enables us to work without any ruby dependencies since we are not a ruby shop, and it is fast!

@DavidGamba
Copy link
Author

@xorpaul how can I use this feature while also using -puppetfile?
I tried having both -puppetfile and -config with only that but they seem to be mutually exclusive.

@chutzimir
Copy link
Contributor

Same sentiment here. My use case in the original #93 sounds similar to what is requested here: The puppet coders clone the control repo, get the branch they want, run g10k to get a copy of the modules so they can easily get a full view of the environment, and now they need to easily make changes to the module they are working on and make commits.

Ideally we want to have cloning work in Puppetfile mode, but it doesn't seem to be trivial.

@DavidGamba
Copy link
Author

The clone_git_modules: true option works with both a puppetfile and a config file when the config points to the repo where the puppetfile lives:

            cat <<EOL > "${dir}/r10k.yaml"
---
:cachedir: /tmp/r10k/cache
:clone_git_modules: true
:sources:
  puppet:
    basedir: ${dir}
    prefix: false
    remote: 'git@repo:path/puppet-r10k.git'
    exit_if_unreachable: true
EOL

            ./bin/g10k -verbose -tags -branch ${r10k_branch_name} -config ${dir}/r10k.yaml

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

No branches or pull requests

3 participants