Skip to content

Commit

Permalink
add some doc in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
sylviamoss committed Jul 28, 2021
1 parent 44a0393 commit 83fbd8e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hcl2template/testdata/hcp_par/duplicate.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build {
}
}
hcp_packer_registry {}
}
}
1 change: 1 addition & 0 deletions hcl2template/testdata/hcp_par/empty.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ build {

source "virtualbox-iso" "ubuntu-1204" {
}

2 changes: 1 addition & 1 deletion hcl2template/testdata/hcp_par/invalid.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ build {
hcp_packer_registry {
labels = ""
}
}
}
2 changes: 1 addition & 1 deletion hcl2template/testdata/hcp_par/long-description.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ super super super super super super super super super super super super super su
super super super long description
EOT
}
}
}
1 change: 1 addition & 0 deletions hcl2template/types.build.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ type BuildBlock struct {
// call for example.
Description string

// HCPPackerRegistry contains the configuration for publishing the image to the HCP Packer Registry.
HCPPackerRegistry *HCPPackerRegistryBlock

// Sources is the list of sources that we want to start in this build block.
Expand Down
7 changes: 5 additions & 2 deletions hcl2template/types.build.hcp_packer_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ package hcl2template

import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/gohcl"
packerregistry "github.com/hashicorp/packer/internal/packer_registry"
)

type HCPPackerRegistryBlock struct {
// Bucket description
Description string
Labels map[string]string
// Bucket labels
Labels map[string]string

HCL2Ref HCL2Ref
HCL2Ref
}

func (b *HCPPackerRegistryBlock) WriteBucketConfig(bucket *packerregistry.Bucket) {
Expand Down

0 comments on commit 83fbd8e

Please sign in to comment.