-
Notifications
You must be signed in to change notification settings - Fork 30
/
main.go
31 lines (26 loc) · 1.03 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package main
import (
"fmt"
"os"
"github.com/hashicorp/packer-plugin-scaffolding/builder/scaffolding"
scaffoldingData "github.com/hashicorp/packer-plugin-scaffolding/datasource/scaffolding"
scaffoldingPP "github.com/hashicorp/packer-plugin-scaffolding/post-processor/scaffolding"
scaffoldingProv "github.com/hashicorp/packer-plugin-scaffolding/provisioner/scaffolding"
scaffoldingVersion "github.com/hashicorp/packer-plugin-scaffolding/version"
"github.com/hashicorp/packer-plugin-sdk/plugin"
)
func main() {
pps := plugin.NewSet()
pps.RegisterBuilder("my-builder", new(scaffolding.Builder))
pps.RegisterProvisioner("my-provisioner", new(scaffoldingProv.Provisioner))
pps.RegisterPostProcessor("my-post-processor", new(scaffoldingPP.PostProcessor))
pps.RegisterDatasource("my-datasource", new(scaffoldingData.Datasource))
pps.SetVersion(scaffoldingVersion.PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}