Skip to content

Commit

Permalink
Register "proxmox" builder again (#175)
Browse files Browse the repository at this point in the history
But add a deprecation warning.
  • Loading branch information
sebastian-de authored Apr 13, 2023
1 parent 11eee96 commit 3eec27d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builder/proxmox/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ func (c *Config) Prepare(upper interface{}, raws ...interface{}) ([]string, []st
var errs *packersdk.MultiError
var warnings []string

if c.Ctx.BuildType == "proxmox" {
warnings = append(warnings, "proxmox is deprecated, please use proxmox-iso instead")
}

// Default qemu_agent to true
if c.Agent != config.TriFalse {
c.Agent = config.TriTrue
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import (

func main() {
pps := plugin.NewSet()
// When the builder was split, the alias "proxmox" was added to Packer for the iso builder.
// Registering 'plugin.DEFAULT_NAME' does the same for the external plugin.
pps.RegisterBuilder(plugin.DEFAULT_NAME, new(proxmoxiso.Builder))
pps.RegisterBuilder("iso", new(proxmoxiso.Builder))
pps.RegisterBuilder("clone", new(proxmoxclone.Builder))
pps.SetVersion(version.PluginVersion)
Expand Down

0 comments on commit 3eec27d

Please sign in to comment.