hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.09k stars 3.33k forks source link

Mechanism to extract files from the build machine #2086

Closed apparentlymart closed 9 years ago

apparentlymart commented 9 years ago

When running tests (for example, ServerSpec) inside packer it would be convenient to have a mechanism to copy files from the machine being built out into the host machine, so that test report files can be archived.

Post-processors run after the build machine is already shut down and the image artifact created, so it seems like this step is too late.

The simplest solution would likely be to have a funny sort of provisioner that acts like the opposite of the file upload provisioner, downloading a file out of the VM. This is technically possible, but it feels weird from a terminology standpoint to call that a "provisioner".

apparentlymart commented 9 years ago

If this feature sounds useful I can write some code for it. I think I'd just make a new provisioner, but I'd love to hear other design ideas too.

mitchellh commented 9 years ago

Done in master, and documented.