From 5bd2d4e6e06db97377c4ef75005a0eed6698dba4 Mon Sep 17 00:00:00 2001 From: "James G. Kim" Date: Fri, 5 Jun 2015 22:01:29 +0900 Subject: [PATCH] Fix a problem preventing `tag` or `save` from docker-tag artifacts --- post-processor/docker-save/post-processor.go | 4 +++- post-processor/docker-tag/post-processor.go | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/post-processor/docker-save/post-processor.go b/post-processor/docker-save/post-processor.go index f35b0053e..ab6170802 100644 --- a/post-processor/docker-save/post-processor.go +++ b/post-processor/docker-save/post-processor.go @@ -9,6 +9,7 @@ import ( "github.com/mitchellh/packer/helper/config" "github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/post-processor/docker-import" + "github.com/mitchellh/packer/post-processor/docker-tag" "github.com/mitchellh/packer/template/interpolate" ) @@ -44,7 +45,8 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { } func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) { - if artifact.BuilderId() != dockerimport.BuilderId { + if artifact.BuilderId() != dockerimport.BuilderId && + artifact.BuilderId() != dockertag.BuilderId { err := fmt.Errorf( "Unknown artifact type: %s\nCan only save Docker builder artifacts.", artifact.BuilderId()) diff --git a/post-processor/docker-tag/post-processor.go b/post-processor/docker-tag/post-processor.go index 7fc47901f..a531f2820 100644 --- a/post-processor/docker-tag/post-processor.go +++ b/post-processor/docker-tag/post-processor.go @@ -45,7 +45,8 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { } func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) { - if artifact.BuilderId() != dockerimport.BuilderId { + if artifact.BuilderId() != BuilderId && + artifact.BuilderId() != dockerimport.BuilderId { err := fmt.Errorf( "Unknown artifact type: %s\nCan only tag from Docker builder artifacts.", artifact.BuilderId())