Merge pull request #2294 from vtolstov/docker

allow import qemu builded artifacts
This commit is contained in:
Mitchell Hashimoto 2015-06-23 08:18:35 -07:00
commit ec9be0928b
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
}