builder/vmware: ESX artifacts have a different builder ID
This is so that things like vagrant post-processors and vsphere post processors don't work.
This commit is contained in:
parent
12478ee276
commit
99605a0816
|
@ -8,12 +8,13 @@ import (
|
|||
// Artifact is the result of running the VMware builder, namely a set
|
||||
// of files associated with the resulting machine.
|
||||
type Artifact struct {
|
||||
dir string
|
||||
f []string
|
||||
builderId string
|
||||
dir string
|
||||
f []string
|
||||
}
|
||||
|
||||
func (*Artifact) BuilderId() string {
|
||||
return BuilderId
|
||||
func (a *Artifact) BuilderId() string {
|
||||
return a.builderId
|
||||
}
|
||||
|
||||
func (a *Artifact) Files() []string {
|
||||
|
|
|
@ -16,6 +16,7 @@ import (
|
|||
)
|
||||
|
||||
const BuilderId = "mitchellh.vmware"
|
||||
const BuilderIdESX = "mitchellh.vmware-esx"
|
||||
|
||||
type Builder struct {
|
||||
config config
|
||||
|
@ -463,7 +464,17 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return &Artifact{b.config.OutputDir, files}, nil
|
||||
// Set the proper builder ID
|
||||
builderId := BuilderId
|
||||
if b.config.RemoteType != "" {
|
||||
builderId = BuilderIdESX
|
||||
}
|
||||
|
||||
return &Artifact{
|
||||
builderId: builderId,
|
||||
dir: b.config.OutputDir,
|
||||
f: files,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (b *Builder) Cancel() {
|
||||
|
|
Loading…
Reference in New Issue