Skip to content

Commit

Permalink
exporter: allow configuring inline attestations for image exporters
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 3eaf157)
  • Loading branch information
jedevc authored and tonistiigi committed Jan 6, 2023
1 parent 0901e93 commit 09a94ed
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions exporter/containerimage/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import (
)

const (
keyImageName = "name"
keyLayerCompression = "compression"
keyCompressionLevel = "compression-level"
keyForceCompression = "force-compression"
keyOCITypes = "oci-mediatypes"
keyBuildInfo = "buildinfo"
keyBuildInfoAttrs = "buildinfo-attrs"
keyImageName = "name"
keyLayerCompression = "compression"
keyCompressionLevel = "compression-level"
keyForceCompression = "force-compression"
keyOCITypes = "oci-mediatypes"
keyBuildInfo = "buildinfo"
keyBuildInfoAttrs = "buildinfo-attrs"
keyForceInlineAttestations = "attestation-inline"

// preferNondistLayersKey is an exporter option which can be used to mark a layer as non-distributable if the layer reference was
// already found to use a non-distributable media type.
Expand Down Expand Up @@ -75,6 +76,8 @@ func (c *ImageCommitOpts) Load(opt map[string]string) (map[string]string, error)
err = parseBoolWithDefault(&c.BuildInfo, k, v, true)
case keyBuildInfoAttrs:
err = parseBoolWithDefault(&c.BuildInfoAttrs, k, v, false)
case keyForceInlineAttestations:
err = parseBool(&c.ForceInlineAttestations, k, v)
case keyPreferNondistLayers:
err = parseBool(&c.RefCfg.PreferNonDistributable, k, v)
default:
Expand Down

0 comments on commit 09a94ed

Please sign in to comment.