Commit 2b36bcc5 authored by Vasiliy Tolstov's avatar Vasiliy Tolstov

allow import qemu builded artifacts

Signed-off-by: default avatarVasiliy Tolstov <v.tolstov@selfip.ru>
parent b77042dc
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment