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 native policyfile resolution support #1014
Conversation
e5691dc
to
8547486
Compare
# @return [String] an absolute path to a Policyfile, relative to the | ||
# kitchen root | ||
# @api private | ||
def policyfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also in chef_base. can we consolidate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is also duplicated for the berks and librarian resolvers. If you want I could refactor all of them, but I didn't want to have one pre-refactored and the others not-refactored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok. thats fine. we can refactor separately.
While we are at it, why not move https://github.com/chef/chef-dk/blob/master/lib/kitchen/provisioner/policyfile_zero.rb here? |
A note about the |
Oh got it @danielsdeleo yeah this is WAY better than the provisioner. I'm 👍 here pending we handle the |
@mwrock done |
ade710a
to
57927ea
Compare
This is sweet. 👍 |
Auto detects policyfiles and uses them for resolution. It's a bit wonky in that it only works with the
chef_zero
provisioner, butchef_solo
seems to still be the default, so you have to at least addprovisioner: chef_zero
to your kitchen YAML. I tested with a kitchen YAML like:I confirmed the named run list functionality works, and also attributes work as expected, so it will fix chef-boneyard/chef-dk#460