Rename hcp_sbom to hcp-sbom

hand-off-lucas
Devashish 2 years ago
parent f2161a6c9c
commit c39d3906fb
No known key found for this signature in database
GPG Key ID: 4642E918377AE2A4

@ -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,
}

@ -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{})

@ -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; -->

@ -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; -->
Loading…
Cancel
Save