mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-28 18:54:07 -04:00
As the last command that relies on the deprecated interfaces for interacting with a template, we move hcl2_upgrade to the schedulers, at least for the part that prepares the template for translation.
26 lines
525 B
Go
26 lines
525 B
Go
package command
|
|
|
|
import (
|
|
"context"
|
|
|
|
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
|
|
"github.com/hashicorp/packer/packer"
|
|
)
|
|
|
|
type Scheduler interface {
|
|
Build(*BuildArgs) int
|
|
Validate(*ValidateArgs) int
|
|
Inspect(*InspectArgs) int
|
|
Console(*ConsoleArgs) int
|
|
HCL2Upgrade(*HCL2UpgradeArgs) int
|
|
}
|
|
|
|
// NewScheduler returns a new scheduler for running commands with.
|
|
func NewScheduler(
|
|
cfg packer.Handler,
|
|
ui packersdk.Ui,
|
|
context context.Context,
|
|
) Scheduler {
|
|
return NewSequentialScheduler(cfg, ui, context)
|
|
}
|