From 46c3113613355d7f9ba928014eaa1dc66d5c7014 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 17 Jan 2018 13:07:41 -0800 Subject: [PATCH] it compiles :) --- builder/oracle/classic/builder.go | 5 +- builder/oracle/classic/config.go | 1 + .../classic/step_create_IP_reservation.go | 14 +- .../oracle/classic/step_create_instance.go | 13 +- builder/oracle/classic/step_instance_info.go | 18 -- builder/oracle/classic/step_snapshot.go | 11 +- builder/oracle/oci/builder.go | 4 +- builder/oracle/oci/ssh.go | 45 ---- command/plugin.go | 198 +++++++++--------- 9 files changed, 131 insertions(+), 178 deletions(-) delete mode 100644 builder/oracle/classic/step_instance_info.go delete mode 100644 builder/oracle/oci/ssh.go diff --git a/builder/oracle/classic/builder.go b/builder/oracle/classic/builder.go index 4867ff34e..4501456d2 100644 --- a/builder/oracle/classic/builder.go +++ b/builder/oracle/classic/builder.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/go-oracle-terraform/compute" "github.com/hashicorp/go-oracle-terraform/opc" + ocommon "github.com/hashicorp/packer/builder/oracle/common" "github.com/hashicorp/packer/common" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/packer" @@ -68,8 +69,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &stepCreateInstance{}, &communicator.StepConnect{ Config: &b.config.Comm, - Host: commHost, - SSHConfig: SSHConfig( + Host: ocommon.CommHost, + SSHConfig: ocommon.SSHConfig( b.config.Comm.SSHUsername, b.config.Comm.SSHPassword), }, diff --git a/builder/oracle/classic/config.go b/builder/oracle/classic/config.go index 050f78d91..10ec44c54 100644 --- a/builder/oracle/classic/config.go +++ b/builder/oracle/classic/config.go @@ -24,6 +24,7 @@ type Config struct { apiEndpointURL *url.URL // Image + ImageName string `mapstructure:"image_name"` Shape string `mapstructure:"shape"` ImageList string `json:"image_list"` diff --git a/builder/oracle/classic/step_create_IP_reservation.go b/builder/oracle/classic/step_create_IP_reservation.go index 797063b1c..f3f898eaa 100644 --- a/builder/oracle/classic/step_create_IP_reservation.go +++ b/builder/oracle/classic/step_create_IP_reservation.go @@ -13,18 +13,14 @@ type stepCreateIPReservation struct{} func (s *stepCreateIPReservation) Run(state multistep.StateBag) multistep.StepAction { ui := state.Get("ui").(packer.Ui) ui.Say("Creating IP reservation...") - client := state.Get("client", client).(*compute.ComputeClient) + client := state.Get("client").(*compute.ComputeClient) iprClient := client.IPReservations() - if err != nil { - log.Printf("Error getting IPReservations Client: %s", err) - return multistep.ActionHalt - } // TODO: add optional Name and Tags - IPInput := &iprClient.CreateIPReservationInput{ + IPInput := &compute.CreateIPReservationInput{ ParentPool: compute.PublicReservationPool, Permanent: true, } - ipRes, err := iprClient.CreateIPReservation(createIPReservation) + ipRes, err := iprClient.CreateIPReservation(IPInput) if err != nil { log.Printf("Error creating IP Reservation: %s", err) return multistep.ActionHalt @@ -33,3 +29,7 @@ func (s *stepCreateIPReservation) Run(state multistep.StateBag) multistep.StepAc log.Printf("debug: ipRes is %#v", ipRes) return multistep.ActionContinue } + +func (s *stepCreateIPReservation) Cleanup(state multistep.StateBag) { + // Nothing to do +} diff --git a/builder/oracle/classic/step_create_instance.go b/builder/oracle/classic/step_create_instance.go index f94d6d0b7..7de599190 100644 --- a/builder/oracle/classic/step_create_instance.go +++ b/builder/oracle/classic/step_create_instance.go @@ -11,10 +11,9 @@ import ( type stepCreateInstance struct{} func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction { - ui.Say("Creating Instance...") - // get variables from state ui := state.Get("ui").(packer.Ui) + ui.Say("Creating Instance...") config := state.Get("config").(Config) client := state.Get("client").(*compute.ComputeClient) sshPublicKey := state.Get("publicKey").(string) @@ -27,7 +26,7 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction Name: config.ImageName, Shape: config.Shape, ImageList: config.ImageList, - SSHKeys: []string{}, + SSHKeys: []string{sshPublicKey}, Attributes: map[string]interface{}{}, } @@ -40,6 +39,10 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction } state.Put("instance_id", instanceInfo.ID) - - ui.Say(fmt.Sprintf("Created instance (%s).", instanceID)) + ui.Say(fmt.Sprintf("Created instance (%s).", instanceInfo.ID)) + return multistep.ActionContinue +} + +func (s *stepCreateInstance) Cleanup(state multistep.StateBag) { + // Nothing to do } diff --git a/builder/oracle/classic/step_instance_info.go b/builder/oracle/classic/step_instance_info.go deleted file mode 100644 index 9ec01cdbc..000000000 --- a/builder/oracle/classic/step_instance_info.go +++ /dev/null @@ -1,18 +0,0 @@ -package classic - -import ( - "github.com/hashicorp/packer/packer" - "github.com/mitchellh/multistep" -) - -type stepInstanceInfo struct{} - -func (s *stepInstanceInfo) Run(state multistep.StateBag) multistep.StepAction { - ui.Say("Getting Instance Info...") - ui := state.Get("ui").(packer.Ui) - instanceID := state.Get("instance_id").(string) - endpoint_path := "/instance/%s", instanceID // GET - - // https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsa/op-instance-%7Bname%7D-get.html - -} diff --git a/builder/oracle/classic/step_snapshot.go b/builder/oracle/classic/step_snapshot.go index 582966a83..2df8976a1 100644 --- a/builder/oracle/classic/step_snapshot.go +++ b/builder/oracle/classic/step_snapshot.go @@ -19,15 +19,15 @@ func (s *stepSnapshot) Run(state multistep.StateBag) multistep.StepAction { instanceID := state.Get("instance_id").(string) // get instances client - snapshotClient := client.SnapshotsClient() + snapshotClient := client.Snapshots() // Instances Input - createSnapshotInput := &CreateSnapshotInput{ + snapshotInput := &compute.CreateSnapshotInput{ Instance: instanceID, MachineImage: config.ImageName, } - snap, err := snapshotClient.CreateSnapshot(input) + snap, err := snapshotClient.CreateSnapshot(snapshotInput) if err != nil { err = fmt.Errorf("Problem creating snapshot: %s", err) ui.Error(err.Error()) @@ -36,4 +36,9 @@ func (s *stepSnapshot) Run(state multistep.StateBag) multistep.StepAction { } ui.Say(fmt.Sprintf("Created snapshot (%s).", snap.Name)) + return multistep.ActionContinue +} + +func (s *stepSnapshot) Cleanup(state multistep.StateBag) { + // Nothing to do } diff --git a/builder/oracle/oci/builder.go b/builder/oracle/oci/builder.go index 07d41b756..612fdf4f6 100644 --- a/builder/oracle/oci/builder.go +++ b/builder/oracle/oci/builder.go @@ -60,8 +60,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &stepInstanceInfo{}, &communicator.StepConnect{ Config: &b.config.Comm, - Host: commHost, - SSHConfig: SSHConfig( + Host: ocommon.CommHost, + SSHConfig: ocommon.SSHConfig( b.config.Comm.SSHUsername, b.config.Comm.SSHPassword), }, diff --git a/builder/oracle/oci/ssh.go b/builder/oracle/oci/ssh.go deleted file mode 100644 index 5424b94b4..000000000 --- a/builder/oracle/oci/ssh.go +++ /dev/null @@ -1,45 +0,0 @@ -package oci - -import ( - "fmt" - - packerssh "github.com/hashicorp/packer/communicator/ssh" - "github.com/hashicorp/packer/helper/multistep" - "golang.org/x/crypto/ssh" -) - -func commHost(state multistep.StateBag) (string, error) { - ipAddress := state.Get("instance_ip").(string) - return ipAddress, nil -} - -// SSHConfig returns a function that can be used for the SSH communicator -// config for connecting to the instance created over SSH using the private key -// or password. -func SSHConfig(username, password string) func(state multistep.StateBag) (*ssh.ClientConfig, error) { - return func(state multistep.StateBag) (*ssh.ClientConfig, error) { - privateKey, hasKey := state.GetOk("privateKey") - if hasKey { - - signer, err := ssh.ParsePrivateKey([]byte(privateKey.(string))) - if err != nil { - return nil, fmt.Errorf("Error setting up SSH config: %s", err) - } - return &ssh.ClientConfig{ - User: username, - Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)}, - HostKeyCallback: ssh.InsecureIgnoreHostKey(), - }, nil - - } - - return &ssh.ClientConfig{ - User: username, - HostKeyCallback: ssh.InsecureIgnoreHostKey(), - Auth: []ssh.AuthMethod{ - ssh.Password(password), - ssh.KeyboardInteractive(packerssh.PasswordKeyboardInteractive(password)), - }, - }, nil - } -} diff --git a/command/plugin.go b/command/plugin.go index d9e7ea577..4f4228fc3 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -14,65 +14,67 @@ import ( "github.com/hashicorp/packer/packer/plugin" alicloudecsbuilder "github.com/hashicorp/packer/builder/alicloud/ecs" + alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import" amazonchrootbuilder "github.com/hashicorp/packer/builder/amazon/chroot" amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs" amazonebssurrogatebuilder "github.com/hashicorp/packer/builder/amazon/ebssurrogate" amazonebsvolumebuilder "github.com/hashicorp/packer/builder/amazon/ebsvolume" - amazoninstancebuilder "github.com/hashicorp/packer/builder/amazon/instance" - azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm" - cloudstackbuilder "github.com/hashicorp/packer/builder/cloudstack" - digitaloceanbuilder "github.com/hashicorp/packer/builder/digitalocean" - dockerbuilder "github.com/hashicorp/packer/builder/docker" - filebuilder "github.com/hashicorp/packer/builder/file" - googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute" - hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso" - hypervvmcxbuilder "github.com/hashicorp/packer/builder/hyperv/vmcx" - lxcbuilder "github.com/hashicorp/packer/builder/lxc" - lxdbuilder "github.com/hashicorp/packer/builder/lxd" - nullbuilder "github.com/hashicorp/packer/builder/null" - oneandonebuilder "github.com/hashicorp/packer/builder/oneandone" - openstackbuilder "github.com/hashicorp/packer/builder/openstack" - oracleocibuilder "github.com/hashicorp/packer/builder/oracle/oci" - parallelsisobuilder "github.com/hashicorp/packer/builder/parallels/iso" - parallelspvmbuilder "github.com/hashicorp/packer/builder/parallels/pvm" - profitbricksbuilder "github.com/hashicorp/packer/builder/profitbricks" - qemubuilder "github.com/hashicorp/packer/builder/qemu" - tritonbuilder "github.com/hashicorp/packer/builder/triton" - virtualboxisobuilder "github.com/hashicorp/packer/builder/virtualbox/iso" - virtualboxovfbuilder "github.com/hashicorp/packer/builder/virtualbox/ovf" - vmwareisobuilder "github.com/hashicorp/packer/builder/vmware/iso" - vmwarevmxbuilder "github.com/hashicorp/packer/builder/vmware/vmx" - alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import" amazonimportpostprocessor "github.com/hashicorp/packer/post-processor/amazon-import" + amazoninstancebuilder "github.com/hashicorp/packer/builder/amazon/instance" + ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local" + ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible" artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice" atlaspostprocessor "github.com/hashicorp/packer/post-processor/atlas" + azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm" checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum" + chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client" + chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo" + cloudstackbuilder "github.com/hashicorp/packer/builder/cloudstack" compresspostprocessor "github.com/hashicorp/packer/post-processor/compress" + convergeprovisioner "github.com/hashicorp/packer/provisioner/converge" + digitaloceanbuilder "github.com/hashicorp/packer/builder/digitalocean" + dockerbuilder "github.com/hashicorp/packer/builder/docker" dockerimportpostprocessor "github.com/hashicorp/packer/post-processor/docker-import" dockerpushpostprocessor "github.com/hashicorp/packer/post-processor/docker-push" dockersavepostprocessor "github.com/hashicorp/packer/post-processor/docker-save" dockertagpostprocessor "github.com/hashicorp/packer/post-processor/docker-tag" - googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export" - manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest" - shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local" - vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant" - vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud" - vspherepostprocessor "github.com/hashicorp/packer/post-processor/vsphere" - vspheretemplatepostprocessor "github.com/hashicorp/packer/post-processor/vsphere-template" - ansibleprovisioner "github.com/hashicorp/packer/provisioner/ansible" - ansiblelocalprovisioner "github.com/hashicorp/packer/provisioner/ansible-local" - chefclientprovisioner "github.com/hashicorp/packer/provisioner/chef-client" - chefsoloprovisioner "github.com/hashicorp/packer/provisioner/chef-solo" - convergeprovisioner "github.com/hashicorp/packer/provisioner/converge" + filebuilder "github.com/hashicorp/packer/builder/file" fileprovisioner "github.com/hashicorp/packer/provisioner/file" + googlecomputebuilder "github.com/hashicorp/packer/builder/googlecompute" + googlecomputeexportpostprocessor "github.com/hashicorp/packer/post-processor/googlecompute-export" + hypervisobuilder "github.com/hashicorp/packer/builder/hyperv/iso" + hypervvmcxbuilder "github.com/hashicorp/packer/builder/hyperv/vmcx" + lxcbuilder "github.com/hashicorp/packer/builder/lxc" + lxdbuilder "github.com/hashicorp/packer/builder/lxd" + manifestpostprocessor "github.com/hashicorp/packer/post-processor/manifest" + nullbuilder "github.com/hashicorp/packer/builder/null" + oneandonebuilder "github.com/hashicorp/packer/builder/oneandone" + openstackbuilder "github.com/hashicorp/packer/builder/openstack" + oracleclassicbuilder "github.com/hashicorp/packer/builder/oracle/classic" + oracleocibuilder "github.com/hashicorp/packer/builder/oracle/oci" + parallelsisobuilder "github.com/hashicorp/packer/builder/parallels/iso" + parallelspvmbuilder "github.com/hashicorp/packer/builder/parallels/pvm" powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell" + profitbricksbuilder "github.com/hashicorp/packer/builder/profitbricks" puppetmasterlessprovisioner "github.com/hashicorp/packer/provisioner/puppet-masterless" puppetserverprovisioner "github.com/hashicorp/packer/provisioner/puppet-server" + qemubuilder "github.com/hashicorp/packer/builder/qemu" saltmasterlessprovisioner "github.com/hashicorp/packer/provisioner/salt-masterless" - shellprovisioner "github.com/hashicorp/packer/provisioner/shell" + shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local" shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local" + shellprovisioner "github.com/hashicorp/packer/provisioner/shell" + tritonbuilder "github.com/hashicorp/packer/builder/triton" + vagrantcloudpostprocessor "github.com/hashicorp/packer/post-processor/vagrant-cloud" + vagrantpostprocessor "github.com/hashicorp/packer/post-processor/vagrant" + virtualboxisobuilder "github.com/hashicorp/packer/builder/virtualbox/iso" + virtualboxovfbuilder "github.com/hashicorp/packer/builder/virtualbox/ovf" + vmwareisobuilder "github.com/hashicorp/packer/builder/vmware/iso" + vmwarevmxbuilder "github.com/hashicorp/packer/builder/vmware/vmx" + vspherepostprocessor "github.com/hashicorp/packer/post-processor/vsphere" + vspheretemplatepostprocessor "github.com/hashicorp/packer/post-processor/vsphere-template" windowsrestartprovisioner "github.com/hashicorp/packer/provisioner/windows-restart" windowsshellprovisioner "github.com/hashicorp/packer/provisioner/windows-shell" + ) type PluginCommand struct { @@ -80,74 +82,78 @@ type PluginCommand struct { } var Builders = map[string]packer.Builder{ - "alicloud-ecs": new(alicloudecsbuilder.Builder), - "amazon-chroot": new(amazonchrootbuilder.Builder), - "amazon-ebs": new(amazonebsbuilder.Builder), - "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), - "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), - "amazon-instance": new(amazoninstancebuilder.Builder), - "azure-arm": new(azurearmbuilder.Builder), - "cloudstack": new(cloudstackbuilder.Builder), - "digitalocean": new(digitaloceanbuilder.Builder), - "docker": new(dockerbuilder.Builder), - "file": new(filebuilder.Builder), - "googlecompute": new(googlecomputebuilder.Builder), - "hyperv-iso": new(hypervisobuilder.Builder), - "hyperv-vmcx": new(hypervvmcxbuilder.Builder), - "lxc": new(lxcbuilder.Builder), - "lxd": new(lxdbuilder.Builder), - "null": new(nullbuilder.Builder), - "oneandone": new(oneandonebuilder.Builder), - "openstack": new(openstackbuilder.Builder), - "oracle-oci": new(oracleocibuilder.Builder), - "parallels-iso": new(parallelsisobuilder.Builder), - "parallels-pvm": new(parallelspvmbuilder.Builder), - "profitbricks": new(profitbricksbuilder.Builder), - "qemu": new(qemubuilder.Builder), - "triton": new(tritonbuilder.Builder), - "virtualbox-iso": new(virtualboxisobuilder.Builder), - "virtualbox-ovf": new(virtualboxovfbuilder.Builder), - "vmware-iso": new(vmwareisobuilder.Builder), - "vmware-vmx": new(vmwarevmxbuilder.Builder), + "alicloud-ecs": new(alicloudecsbuilder.Builder), + "amazon-chroot": new(amazonchrootbuilder.Builder), + "amazon-ebs": new(amazonebsbuilder.Builder), + "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), + "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), + "amazon-instance": new(amazoninstancebuilder.Builder), + "azure-arm": new(azurearmbuilder.Builder), + "cloudstack": new(cloudstackbuilder.Builder), + "digitalocean": new(digitaloceanbuilder.Builder), + "docker": new(dockerbuilder.Builder), + "file": new(filebuilder.Builder), + "googlecompute": new(googlecomputebuilder.Builder), + "hyperv-iso": new(hypervisobuilder.Builder), + "hyperv-vmcx": new(hypervvmcxbuilder.Builder), + "lxc": new(lxcbuilder.Builder), + "lxd": new(lxdbuilder.Builder), + "null": new(nullbuilder.Builder), + "oneandone": new(oneandonebuilder.Builder), + "openstack": new(openstackbuilder.Builder), + "oracle-classic": new(oracleclassicbuilder.Builder), + "oracle-oci": new(oracleocibuilder.Builder), + "parallels-iso": new(parallelsisobuilder.Builder), + "parallels-pvm": new(parallelspvmbuilder.Builder), + "profitbricks": new(profitbricksbuilder.Builder), + "qemu": new(qemubuilder.Builder), + "triton": new(tritonbuilder.Builder), + "virtualbox-iso": new(virtualboxisobuilder.Builder), + "virtualbox-ovf": new(virtualboxovfbuilder.Builder), + "vmware-iso": new(vmwareisobuilder.Builder), + "vmware-vmx": new(vmwarevmxbuilder.Builder), } + var Provisioners = map[string]packer.Provisioner{ - "ansible": new(ansibleprovisioner.Provisioner), - "ansible-local": new(ansiblelocalprovisioner.Provisioner), - "chef-client": new(chefclientprovisioner.Provisioner), - "chef-solo": new(chefsoloprovisioner.Provisioner), - "converge": new(convergeprovisioner.Provisioner), - "file": new(fileprovisioner.Provisioner), - "powershell": new(powershellprovisioner.Provisioner), - "puppet-masterless": new(puppetmasterlessprovisioner.Provisioner), - "puppet-server": new(puppetserverprovisioner.Provisioner), + "ansible": new(ansibleprovisioner.Provisioner), + "ansible-local": new(ansiblelocalprovisioner.Provisioner), + "chef-client": new(chefclientprovisioner.Provisioner), + "chef-solo": new(chefsoloprovisioner.Provisioner), + "converge": new(convergeprovisioner.Provisioner), + "file": new(fileprovisioner.Provisioner), + "powershell": new(powershellprovisioner.Provisioner), + "puppet-masterless": new(puppetmasterlessprovisioner.Provisioner), + "puppet-server": new(puppetserverprovisioner.Provisioner), "salt-masterless": new(saltmasterlessprovisioner.Provisioner), - "shell": new(shellprovisioner.Provisioner), - "shell-local": new(shelllocalprovisioner.Provisioner), + "shell": new(shellprovisioner.Provisioner), + "shell-local": new(shelllocalprovisioner.Provisioner), "windows-restart": new(windowsrestartprovisioner.Provisioner), - "windows-shell": new(windowsshellprovisioner.Provisioner), + "windows-shell": new(windowsshellprovisioner.Provisioner), } + var PostProcessors = map[string]packer.PostProcessor{ - "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), - "amazon-import": new(amazonimportpostprocessor.PostProcessor), - "artifice": new(artificepostprocessor.PostProcessor), - "atlas": new(atlaspostprocessor.PostProcessor), - "checksum": new(checksumpostprocessor.PostProcessor), - "compress": new(compresspostprocessor.PostProcessor), - "docker-import": new(dockerimportpostprocessor.PostProcessor), - "docker-push": new(dockerpushpostprocessor.PostProcessor), - "docker-save": new(dockersavepostprocessor.PostProcessor), - "docker-tag": new(dockertagpostprocessor.PostProcessor), - "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), - "manifest": new(manifestpostprocessor.PostProcessor), - "shell-local": new(shelllocalpostprocessor.PostProcessor), - "vagrant": new(vagrantpostprocessor.PostProcessor), - "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), - "vsphere": new(vspherepostprocessor.PostProcessor), - "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), + "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), + "amazon-import": new(amazonimportpostprocessor.PostProcessor), + "artifice": new(artificepostprocessor.PostProcessor), + "atlas": new(atlaspostprocessor.PostProcessor), + "checksum": new(checksumpostprocessor.PostProcessor), + "compress": new(compresspostprocessor.PostProcessor), + "docker-import": new(dockerimportpostprocessor.PostProcessor), + "docker-push": new(dockerpushpostprocessor.PostProcessor), + "docker-save": new(dockersavepostprocessor.PostProcessor), + "docker-tag": new(dockertagpostprocessor.PostProcessor), + "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), + "manifest": new(manifestpostprocessor.PostProcessor), + "shell-local": new(shelllocalpostprocessor.PostProcessor), + "vagrant": new(vagrantpostprocessor.PostProcessor), + "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), + "vsphere": new(vspherepostprocessor.PostProcessor), + "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), } + var pluginRegexp = regexp.MustCompile("packer-(builder|post-processor|provisioner)-(.+)") func (c *PluginCommand) Run(args []string) int {