Skip to content

Commit

Permalink
Add all image meta fields to ImageMeta struct
Browse files Browse the repository at this point in the history
Signed-off-by: Garrett Cheadle <gcheadle@vmware.com>
  • Loading branch information
cari-lynn authored and gcheadle-vmware committed Sep 1, 2021
1 parent c553f0b commit 3d5e1d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 1 addition & 5 deletions pkg/kbld/cmd/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,7 @@ func (o *ResolveOptions) imgpkgLockAnnotations(i ProcessedImageItem) map[string]
if imageMetas != nil && len(imageMetas) > 0 {
var metas []ctlconf.ImageMeta
for _, m := range imageMetas {
metas = append(metas, ctlconf.ImageMeta{
URL: m.URL,
Type: m.Type,
Tag: m.Tag,
})
metas = append(metas, m)
}
metaYaml, err := yaml.Marshal(metas)
if err != nil {
Expand Down
11 changes: 8 additions & 3 deletions pkg/kbld/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ type ImageOverride struct {
}

type ImageMeta struct {
URL string `json:"URL,omitempty" yaml:"URL,omitempty"`
Type string `json:"Type,omitempty" yaml:"Type,omitempty"`
Tag string `json:"Tag,omitempty" yaml:"Tag,omitempty"`
URL string `json:",omitempty" yaml:",omitempty"`
Type string `json:",omitempty" yaml:",omitempty"`
Tag string `json:",omitempty" yaml:",omitempty"`
Path string `json:",omitempty" yaml:",omitempty"`
RemoteURL string `json:",omitempty" yaml:",omitempty"`
SHA string `json:",omitempty" yaml:",omitempty"`
Dirty bool `json:",omitempty" yaml:",omitempty"`
Tags []string `json:",omitempty" yaml:",omitempty"`
}

type ImageDestination struct {
Expand Down

0 comments on commit 3d5e1d4

Please sign in to comment.