-
Notifications
You must be signed in to change notification settings - Fork 353
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
Adds ability to resolve dependencies from a source file #1232 #1314
Conversation
This modifies the path resolution so that /path/to/Puppetfile.lock is preferred. If the lockfile exists, then it will be used instead of the Puppetfile. It also adds a `puppetfile resolve` action that will resolve dependencies and write out that lockfile. Note: all dependencies will be satisfied from the Forge, no matter what the original source was. Expected user workflow: * Write Puppetfile that describes only the modules you intend to use. * Run `r10k puppetfile resolve` to resolve all dependencies of those modules. * Optional: review the dependent modules for quality and security purposes. * Deploy. @glennsarti what do you think about this implementation? It feels a bit weird to have multiple Puppetfile parsers in the same tool, but don't really see a better way. And am I using the dependency graph properly?
This changes the workflow to resolving dependencies from a source Puppetfile.src to the Puppetfile used by r10k to deploy code. This makes this workflow completely opt-in.
Commenting here as I was summoned by a commit.... @binford2k The puppetfile resolver has a parser in it to convert text (puppetfile) into a document model. However you can absolutely create the document model in another way. I know that's how bolt does it. Rough psuedo code.
|
That said, my parser has magic-comment support as per - https://sarti.dev/puppetfile-resolver/parsers |
This PR has been marked stale because it has had no activity for 60 days. If you are still interested in getting this merged, please comment and we'll try to move it forward. Otherwise, it will be closed in 7 days. |
I think a lot of people would be interested in this functionality. Are there any plans to revive this PR? |
@jhoblitt I'd love to get it into core, but no luck yet. In the meantime, I recreated it as a standalone tool https://github.com/binford2k/r10k-resolve |
@binford2k hmm. I think something like a rake target that could be run under CI would be needed to make sure that the Puppetfile is update to date. |
This supersedes PR #1232 and updates the expected workflow to
Puppetfile.src
that describes only the modules you intend to use.r10k puppetfile resolve
to resolve all dependencies of those modules.Puppetfile
for quality and security purposes.