From 2b36bcc502471bda23fd69beb2cf4c3a6f759f7e Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 23 Jun 2015 14:28:03 +0300 Subject: [PATCH] allow import qemu builded artifacts Signed-off-by: Vasiliy Tolstov --- post-processor/docker-import/post-processor.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/post-processor/docker-import/post-processor.go b/post-processor/docker-import/post-processor.go index f9a9a18a9..8074d1a02 100644 --- a/post-processor/docker-import/post-processor.go +++ b/post-processor/docker-import/post-processor.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/mitchellh/packer/builder/docker" + "github.com/mitchellh/packer/builder/qemu" "github.com/mitchellh/packer/common" "github.com/mitchellh/packer/helper/config" "github.com/mitchellh/packer/packer" @@ -42,9 +43,12 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { } func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) { - if artifact.BuilderId() != docker.BuilderId { + switch artifact.BuilderId() { + case docker.BuilderId, qemu.BuilderId: + break + default: err := fmt.Errorf( - "Unknown artifact type: %s\nCan only import from Docker builder artifacts.", + "Unknown artifact type: %s\nCan only import from Docker, Qemu builder artifacts.", artifact.BuilderId()) return nil, false, err }