Hi All,
What I would like to do is only build AMIs/Vagrant Boxes providing that the provisioned VM (during the Packer provisioning step) has passed a suite of tests (whether it be chefspec, serverspec, cucumber, etc.). Ideally these tests should only execute right after the last provisioning step and just before any post-processing is done. It appears to me that the current Packer configuration doesn't have a formal "certification" or "verification" construct.
What have people found to be the best way to test their packer-provisioned VMs before their AMI/Vagrant Boxes are created?
* Have a shell provisioner call your test suite in the last step of the provisioners section?
* Have a custom provisioner call your test suite? (and have it as the last step in the provisioners section)
* Have a custom post-processor call your test suite? (and have it as the first step in the post-processing section)
* Other options?
Thanks!
-- Ross