mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-27 10:14:01 -04:00
Rename hcp_sbom to hcp-sbom
This commit is contained in:
+2
-2
@@ -28,7 +28,7 @@ import (
|
||||
shelllocalpostprocessor "github.com/hashicorp/packer/post-processor/shell-local"
|
||||
breakpointprovisioner "github.com/hashicorp/packer/provisioner/breakpoint"
|
||||
fileprovisioner "github.com/hashicorp/packer/provisioner/file"
|
||||
hcp_sbomprovisioner "github.com/hashicorp/packer/provisioner/hcp_sbom"
|
||||
hcpsbomprovisioner "github.com/hashicorp/packer/provisioner/hcp-sbom"
|
||||
powershellprovisioner "github.com/hashicorp/packer/provisioner/powershell"
|
||||
shellprovisioner "github.com/hashicorp/packer/provisioner/shell"
|
||||
shelllocalprovisioner "github.com/hashicorp/packer/provisioner/shell-local"
|
||||
@@ -49,7 +49,7 @@ var Builders = map[string]packersdk.Builder{
|
||||
var Provisioners = map[string]packersdk.Provisioner{
|
||||
"breakpoint": new(breakpointprovisioner.Provisioner),
|
||||
"file": new(fileprovisioner.Provisioner),
|
||||
"hcp_sbom": new(hcp_sbomprovisioner.Provisioner),
|
||||
"hcp-sbom": new(hcpsbomprovisioner.Provisioner),
|
||||
"powershell": new(powershellprovisioner.Provisioner),
|
||||
"shell": new(shellprovisioner.Provisioner),
|
||||
"shell-local": new(shelllocalprovisioner.Provisioner),
|
||||
|
||||
@@ -516,7 +516,7 @@ func (cfg *PackerConfig) getCoreBuildProvisioner(source SourceUseBlock, pb *Prov
|
||||
}
|
||||
}
|
||||
|
||||
if pb.PType == "hcp_sbom" {
|
||||
if pb.PType == "hcp-sbom" {
|
||||
provisioner = &packer.SBOMInternalProvisioner{
|
||||
Provisioner: provisioner,
|
||||
}
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName
|
||||
}
|
||||
}
|
||||
|
||||
if rawP.Type == "hcp_sbom" {
|
||||
if rawP.Type == "hcp-sbom" {
|
||||
provisioner = &SBOMInternalProvisioner{
|
||||
Provisioner: provisioner,
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
hcpSbomProvisioner "github.com/hashicorp/packer/provisioner/hcp_sbom"
|
||||
hcpSbomProvisioner "github.com/hashicorp/packer/provisioner/hcp-sbom"
|
||||
|
||||
"github.com/klauspost/compress/zstd"
|
||||
|
||||
@@ -241,9 +241,9 @@ func (p *DebuggedProvisioner) Provision(ctx context.Context, ui packersdk.Ui, co
|
||||
return p.Provisioner.Provision(ctx, ui, comm, generatedData)
|
||||
}
|
||||
|
||||
// SBOMInternalProvisioner is a wrapper provisioner for the `hcp_sbom` provisioner
|
||||
// SBOMInternalProvisioner is a wrapper provisioner for the `hcp-sbom` provisioner
|
||||
// that sets the path for SBOM file download and, after the successful execution of
|
||||
// the `hcp_sbom` provisioner, compresses the SBOM and prepares the data for API
|
||||
// the `hcp-sbom` provisioner, compresses the SBOM and prepares the data for API
|
||||
// integration.
|
||||
type SBOMInternalProvisioner struct {
|
||||
Provisioner packersdk.Provisioner
|
||||
|
||||
@@ -80,7 +80,7 @@ func (p *Provisioner) Provision(
|
||||
ctx context.Context, ui packersdk.Ui, comm packersdk.Communicator,
|
||||
generatedData map[string]interface{},
|
||||
) error {
|
||||
log.Println("Starting to provision with `hcp_sbom` provisioner")
|
||||
log.Println("Starting to provision with `hcp-sbom` provisioner")
|
||||
|
||||
if generatedData == nil {
|
||||
generatedData = make(map[string]interface{})
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<!-- Code generated from the comments of the Config struct in provisioner/hcp_sbom/provisioner.go; DO NOT EDIT MANUALLY -->
|
||||
<!-- Code generated from the comments of the Config struct in provisioner/hcp-sbom/provisioner.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `destination` (string) - Destination is an optional field that specifies the path where the SBOM
|
||||
file will be downloaded to for the user.
|
||||
@@ -10,4 +10,4 @@
|
||||
a "Permission Denied" error will occur. If the source path is a file,
|
||||
it is recommended that the destination path be a file as well.
|
||||
|
||||
<!-- End of code generated from the comments of the Config struct in provisioner/hcp_sbom/provisioner.go; -->
|
||||
<!-- End of code generated from the comments of the Config struct in provisioner/hcp-sbom/provisioner.go; -->
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<!-- Code generated from the comments of the Config struct in provisioner/hcp_sbom/provisioner.go; DO NOT EDIT MANUALLY -->
|
||||
<!-- Code generated from the comments of the Config struct in provisioner/hcp-sbom/provisioner.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `source` (string) - Source is a required field that specifies the path to the SBOM file that
|
||||
needs to be downloaded.
|
||||
It can be a file path or a URL.
|
||||
|
||||
<!-- End of code generated from the comments of the Config struct in provisioner/hcp_sbom/provisioner.go; -->
|
||||
<!-- End of code generated from the comments of the Config struct in provisioner/hcp-sbom/provisioner.go; -->
|
||||
Reference in New Issue
Block a user