chef-boneyard/chef-dk

Generate Policyfile.lock.json without Kitchen Test

kurtbomya opened this issue · 1 comments

Describe the Enhancement:

Presently, I have to delete the Policyfile.lock.json after versioning metadata.rb. The only way to re-generate the Policyfile.lock.json that I'm aware of is to run kitchen test and capture & commit the modified artifact.

Ideally there'd be some command to generate the Policyfile.lock.json without running a full blown kitchen test or kitchen converge each time. Some command that just does the initial "Oh hey there's no Policyfile.lock.json here, I'll generate one!" - and then stop!

Describe the Need:

  • Anyone who's using kitchen test in a pipeline would probably desire this kind of enhancement.

Current Alternative

  • Using kitchen test in the CI pipeline before the modified Policyfile.lock.json is created and committed (Adding lots of needless time to the pipeline)

Can We Help You Implement This?:

  • Does an existing command already exist and I've just failed to read every doc? (Possibly!)

:the_more_you_know: The command already exists.

chef install path/to/Policyfile.rb

The chef install command appears to generate a policyfile with the json lock as you'd expect it to.