diff --git a/command/push.go b/command/push.go index 9e7c735bb..4e315f36c 100644 --- a/command/push.go +++ b/command/push.go @@ -58,8 +58,16 @@ func (c *PushCommand) Run(args []string) int { } // Build our client - c.client = harmony.DefaultClient() defer func() { c.client = nil }() + c.client = harmony.DefaultClient() + if tpl.Push.Address != "" { + c.client, err = harmony.NewClient(tpl.Push.Address) + if err != nil { + c.Ui.Error(fmt.Sprintf( + "Error setting up API client: %s", err)) + return 1 + } + } // Build the archiving options var opts archive.ArchiveOpts diff --git a/packer/template.go b/packer/template.go index 562d23edd..0c0bd9bf0 100644 --- a/packer/template.go +++ b/packer/template.go @@ -45,6 +45,7 @@ type Template struct { // PushConfig is the configuration structure for the push settings. type PushConfig struct { Name string + Address string BaseDir string Include []string Exclude []string