* the very initial builder: just clones the VM * removed post-processor * builder now waits for IP address * more separated steps * clean up * added run and shutdown steps * added step connecting via ssh * changed the BuilderId to a proper one * added shutdown command, only echo works * added cleanup * removed wainting for VM to stop, removed error on the non-zero exit status * removed BuildSuccessFlag * refactored config structures; fixed interpolation of json template * the rest of configuration refactoring * removed duplicated parameters from Config * removed duplicated parameters drom Config * changed BuilderId and Artifact * create a dedicated step for VM hardware configuration * merged StepSetupCloningEnv into StepCloneVM * improved cleanup * added proper handling of 'disconnected' command exit status; added guest os shutdown before halting the machine [in case when no shutdown command is given] * refactored non-conventional variable and field names * removed redundant fields from Artifact * removed the success field at all * removed ArtifactFiles * removed unnecessary warnings * minor change in parameters structure
13 lines
201 B
Go
13 lines
201 B
Go
package main
|
|
|
|
import "github.com/hashicorp/packer/packer/plugin"
|
|
|
|
func main() {
|
|
server, err := plugin.Server()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
server.RegisterBuilder(new(Builder))
|
|
server.Serve()
|
|
}
|