Skip to content

Commit

Permalink
Add options to distinguish between component and processing data
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianburth committed Nov 19, 2024
1 parent 43c9c16 commit 0f9fc6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion cmds/ocm/commands/ocmcmds/common/addhdlrs/rscs/elements.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (h *ResourceSpecHandler) Set(v ocm.ComponentVersionAccess, r addhdlrs.Eleme
SourceRefs: compdescv2.ConvertSourcerefsTo(spec.SourceRefs),
}
opts := h.getModOpts()
if spec.SkipDigestGeneration {
if spec.Options.SkipDigestGeneration {
opts = append(opts, ocm.SkipDigest()) //nolint:staticcheck // skip digest still used for tests
}
/*
Expand Down Expand Up @@ -133,11 +133,16 @@ type ResourceSpec struct {
addhdlrs.ResourceInput `json:",inline"`

// additional process related options
Options Options `json:"options"`

// SkipDigestGeneration omits the digest generation.
SkipDigestGeneration bool `json:"skipDigestGeneration,omitempty"`
}

type Options struct {
SkipDigestGeneration bool `json:"skipDigestGeneration,omitempty"`
}

var _ addhdlrs.ElementSpec = (*ResourceSpec)(nil)

func (r *ResourceSpec) GetType() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ labels:
resources:
- name: text
type: PlainText
skipDigestGeneration: true
labels:
- name: city
value: Karlsruhe
merge:
algorithm: default
config:
overwrite: inbound
options:
skipDigestGeneration: true
input:
type: file
path: testdata
Expand Down

0 comments on commit 0f9fc6a

Please sign in to comment.