Commit ec9be092 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #2294 from vtolstov/docker

allow import qemu builded artifacts
parents b77042dc 2b36bcc5
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"github.com/mitchellh/packer/builder/docker" "github.com/mitchellh/packer/builder/docker"
"github.com/mitchellh/packer/builder/qemu"
"github.com/mitchellh/packer/common" "github.com/mitchellh/packer/common"
"github.com/mitchellh/packer/helper/config" "github.com/mitchellh/packer/helper/config"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
...@@ -42,9 +43,12 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { ...@@ -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) { 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( 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()) artifact.BuilderId())
return nil, false, err 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