allow import qemu builded artifacts

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
Vasiliy Tolstov 2015-06-23 14:28:03 +03:00
parent b77042dc85
commit 2b36bcc502
1 changed files with 6 additions and 2 deletions

View File

@ -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
}