Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2a36ad3
chore: add wget example and cross-reference to ´ocm get credentials` …
morri-son Mar 25, 2026
0018a3a
add upper camel case types
morrison-sap Mar 25, 2026
4fb0e13
regenerate docs
morrison-sap Mar 25, 2026
c6bdf83
chore(deps): bump github.com/go-git/go-git/v5 from 5.17.0 to 5.17.1 (…
dependabot[bot] Apr 1, 2026
2670be8
chore: update 'flake.nix' (#1889)
ocmbot[bot] Apr 1, 2026
9361439
chore(deps): bump github.com/go-git/go-git/v5 from 5.17.1 to 5.17.2 (…
dependabot[bot] Apr 7, 2026
65b180b
chore(deps): bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 (…
dependabot[bot] Apr 7, 2026
ce4beff
chore(deps): bump the ci group across 1 directory with 5 updates (#1893)
dependabot[bot] Apr 7, 2026
4522606
chore(deps): bump the go group across 1 directory with 11 updates (#1…
dependabot[bot] Apr 7, 2026
719a7e1
chore: update 'flake.nix' (#1895)
ocmbot[bot] Apr 7, 2026
73db3de
chore(deps): migrate github.com/containers/image (#1898)
frewilhelm Apr 7, 2026
84a3bfb
chore: update 'flake.nix' (#1899)
ocmbot[bot] Apr 7, 2026
ce605fc
chore: bump VERSION to 0.41.0-dev (#1900)
ocmbot[bot] Apr 8, 2026
6e6b534
chore(deps): bump go.opentelemetry.io/otel/sdk from 1.41.0 to 1.43.0 …
dependabot[bot] Apr 9, 2026
7b8cfda
chore: update 'flake.nix' (#1903)
ocmbot[bot] Apr 9, 2026
4b0c330
chore(deps): bump codelytv/pr-size-labeler from 1.10.3 to 1.10.4 in t…
dependabot[bot] Apr 9, 2026
71b28b6
chore(deps): bump go to 1.26.2 (#1905)
frewilhelm Apr 9, 2026
497ac45
chore(deps): bump actions/github-script from 8.0.0 to 9.0.0 in the ci…
dependabot[bot] Apr 10, 2026
3db039c
feat: add OCIImageLayer upper camel case alias for ociBlob access type
morrison-sap Apr 10, 2026
fb8b9c6
chore: register LocalBlob/v1 as UpperCamelCase alias for localBlob
morrison-sap Apr 13, 2026
bc16e55
chore(deps): bump helm.sh/helm/v4 from 4.1.3 to 4.1.4 (#1908)
dependabot[bot] Apr 10, 2026
8efdd44
chore(deps): bump the go group with 9 updates (#1909)
dependabot[bot] Apr 13, 2026
c85bee1
chore(deps): bump github.com/fluxcd/cli-utils from 0.37.2-flux.1 to 1…
dependabot[bot] Apr 13, 2026
79701e9
chore(deps): bump the ci group with 4 updates (#1911)
dependabot[bot] Apr 13, 2026
47c2465
chore: resolve go.mod/go.sum merge conflicts from upstream
morrison-sap Apr 14, 2026
ed5a79d
Merge remote-tracking branch 'upstream/main' into add-upp-camel-case-…
morrison-sap Apr 14, 2026
18abe21
Merge branch 'main' into add-upp-camel-case-types
matthiasbruns Apr 16, 2026
3c90c07
chore(deps): bump github/codeql-action from 4.35.1 to 4.35.2 in the c…
dependabot[bot] Apr 16, 2026
39a488d
Merge remote-tracking branch 'upstream/main' into add-upp-camel-case-…
morrison-sap Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/ocm/extensions/accessmethods/helm/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ import (
const (
Type = "helm"
TypeV1 = Type + runtime.VersionSeparator + "v1"

UpperType = "Helm"
UpperTypeV1 = UpperType + runtime.VersionSeparator + "v1"
)

func init() {
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](Type, accspeccpi.WithDescription(usage)))
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](TypeV1, accspeccpi.WithFormatSpec(formatV1), accspeccpi.WithConfigHandler(ConfigHandler())))

accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](UpperType))
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](UpperTypeV1))
}

// New creates a new Helm Chart accessor for helm repositories.
Expand Down
6 changes: 6 additions & 0 deletions api/ocm/extensions/accessmethods/localblob/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import (
const (
Type = "localBlob"
TypeV1 = Type + runtime.VersionSeparator + "v1"

UpperType = "LocalBlob"
UpperTypeV1 = UpperType + runtime.VersionSeparator + "v1"
)

// this package shows how to implement access types with multiple serialization versions.
Expand Down Expand Up @@ -51,6 +54,9 @@ func init() {
Must(versions.Register(accspeccpi.NewAccessSpecTypeByConverter[*AccessSpec, *AccessSpecV1](Type, &converterV1{}, accspeccpi.WithDescription(usage))))
Must(versions.Register(accspeccpi.NewAccessSpecTypeByConverter[*AccessSpec, *AccessSpecV1](TypeV1, &converterV1{}, accspeccpi.WithFormatSpec(formatV1), accspeccpi.WithConfigHandler(ConfigHandler()))))
accspeccpi.RegisterAccessTypeVersions(versions)

accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecTypeByConverter[*AccessSpec, *AccessSpecV1](UpperType, &converterV1{}))
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecTypeByConverter[*AccessSpec, *AccessSpecV1](UpperTypeV1, &converterV1{}))
}

func Is(spec accspeccpi.AccessSpec) bool {
Expand Down
6 changes: 6 additions & 0 deletions api/ocm/extensions/accessmethods/ociblob/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ import (
const (
Type = "ociBlob"
TypeV1 = Type + runtime.VersionSeparator + "v1"

UpperType = "OCIImageLayer"
UpperTypeV1 = UpperType + runtime.VersionSeparator + "v1"
)

func init() {
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](Type, accspeccpi.WithDescription(usage)))
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](TypeV1, accspeccpi.WithFormatSpec(formatV1), accspeccpi.WithConfigHandler(ConfigHandler())))

accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](UpperType))
accspeccpi.RegisterAccessType(accspeccpi.NewAccessSpecType[*AccessSpec](UpperTypeV1))
}

// New creates a new OCIBlob accessor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import (
"ocm.software/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
)

const TYPE = "dir"
const (
TYPE = "dir"
Comment thread
morri-son marked this conversation as resolved.
UPPER_TYPE = "Dir"
)

func init() {
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
}

const usage = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ import (
"ocm.software/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
)

const TYPE = "file"
const (
TYPE = "file"
UPPER_TYPE = "File"
)

func init() {
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{},
Usage("The path must denote a file relative the resources file. "), ConfigHandler()))
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{},
Usage("The path must denote a file relative the resources file. "), ConfigHandler()))
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import (
"ocm.software/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
)

const TYPE = "helm"
const (
TYPE = "helm"
UPPER_TYPE = "Helm"
)

func init() {
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
}

const usage = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ import (
"ocm.software/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
)

const TYPE = "utf8"
const (
TYPE = "utf8"
UPPER_TYPE = "UTF8"
)

func init() {
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{},
usage, ConfigHandler()))
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{},
usage, ConfigHandler()))
}

const usage = `
Expand Down
162 changes: 162 additions & 0 deletions docs/reference/ocm_add_resource-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,168 @@ There are several templaters that can be selected by the <code>--templater</code
The resource specification supports the following blob input types, specified
with the field <code>type</code> in the <code>input</code> field:

- Input type <code>Dir</code>

The path must denote a directory relative to the resources file, which is packed
with tar and optionally compressed
if the <code>compress</code> field is set to <code>true</code>. If the field
<code>preserveDir</code> is set to true the directory itself is added to the tar.
If the field <code>followSymLinks</code> is set to <code>true</code>, symbolic
links are not packed but their targets files or folders.
With the list fields <code>includeFiles</code> and <code>excludeFiles</code> it is
possible to specify which files should be included or excluded. The values are
regular expression used to match relative file paths. If no includes are specified
all file not explicitly excluded are used.

This blob type specification supports the following fields:
- **<code>path</code>** *string*

This REQUIRED property describes the file path to directory relative to the
resource file location.

- **<code>mediaType</code>** *string*

This OPTIONAL property describes the media type to store with the local blob.
The default media type is application/x-tar and
application/gzip if compression is enabled.

- **<code>compress</code>** *bool*

This OPTIONAL property describes whether the file content should be stored
compressed or not.

- **<code>preserveDir</code>** *bool*

This OPTIONAL property describes whether the specified directory with its
basename should be included as top level folder.

- **<code>followSymlinks</code>** *bool*

This OPTIONAL property describes whether symbolic links should be followed or
included as links.

- **<code>excludeFiles</code>** *list of regex*

This OPTIONAL property describes regular expressions used to match files
that should NOT be included in the tar file. It takes precedence over
the include match.

- **<code>includeFiles</code>** *list of regex*

This OPTIONAL property describes regular expressions used to match files
that should be included in the tar file. If this option is not given
all files not explicitly excluded are used.

Options used to configure fields: <code>--inputCompress</code>, <code>--inputExcludes</code>, <code>--inputFollowSymlinks</code>, <code>--inputIncludes</code>, <code>--inputPath</code>, <code>--inputPreserveDir</code>, <code>--mediaType</code>

- Input type <code>File</code>

The path must denote a file relative the resources file.
The content is compressed if the <code>compress</code> field
is set to <code>true</code>.

This blob type specification supports the following fields:
- **<code>path</code>** *string*

This REQUIRED property describes the path to the file relative to the
resource file location.

- **<code>mediaType</code>** *string*

This OPTIONAL property describes the media type to store with the local blob.
The default media type is application/octet-stream and
application/gzip if compression is enabled.

- **<code>compress</code>** *bool*

This OPTIONAL property describes whether the content should be stored
compressed or not.

Options used to configure fields: <code>--inputCompress</code>, <code>--inputPath</code>, <code>--mediaType</code>

- Input type <code>Helm</code>

The path must denote an helm chart archive or directory
relative to the resources file or a chart name in a helm chart repository.
The denoted chart is packed as an OCI artifact set.
For the filesystem version additional provider info is taken from a file with
the same name and the suffix <code>.prov</code>.

If the chart should just be stored as plain archive, please use the
type <code>file</code> or <code>dir</code>, instead.

This blob type specification supports the following fields:
- **<code>path</code>** *string*

This REQUIRED property describes the file path to the helm chart relative to the
resource file location.

- **<code>version</code>** *string*

This OPTIONAL property can be set to configure an explicit version hint.
If not specified the version from the chart will be used.
Basically, it is a good practice to use the component version for local resources
This can be achieved by using templating for this attribute in the resource file.

- **<code>helmRepository</code>** *string*

This OPTIONAL property can be set, if the helm chart should be loaded from
a helm repository instead of the local filesystem. It describes
the base URL of the chart repository. If specified, the <code>path</code> field
must describe the name of the chart in the chart repository, and <code>version</code>
must describe the version of the chart imported from the chart repository

- **<code>repository</code>** *string*

This OPTIONAL property can be used to specify the repository hint for the
generated local artifact access. It is prefixed by the component name if
it does not start with slash "/".

- **<code>caCertFile</code>** *string*

This OPTIONAL property can be used to specify a relative filename for
the TLS root certificate used to access a helm repository.

- **<code>caCert</code>** *string*

This OPTIONAL property can be used to specify a TLS root certificate used to
access a helm repository.

Options used to configure fields: <code>--hint</code>, <code>--inputCompress</code>, <code>--inputHelmRepository</code>, <code>--inputPath</code>, <code>--inputVersion</code>, <code>--mediaType</code>

- Input type <code>UTF8</code>

This blob type is used to provide inline text based content (UTF8). The
specification supports the following fields:
- **<code>text</code>** *string*

The utf8 string content to provide.

- **<code>json</code>** *JSON or JSON string interpreted as JSON*

The content emitted as JSON.

- **<code>formattedJson</code>** *YAML/JSON or JSON/YAML string interpreted as JSON*

The content emitted as formatted JSON.

- **<code>yaml</code>** *AML/JSON or JSON/YAML string interpreted as YAML*

The content emitted as YAML.

- **<code>mediaType</code>** *string*

This OPTIONAL property describes the media type to store with the local blob.
The default media type is application/octet-stream and
application/gzip if compression is enabled.

- **<code>compress</code>** *bool*

This OPTIONAL property describes whether the content should be stored
compressed or not.

Options used to configure fields: <code>--inputCompress</code>, <code>--inputFormattedJson</code>, <code>--inputJson</code>, <code>--inputText</code>, <code>--inputYaml</code>, <code>--mediaType</code>

- Input type <code>binary</code>

This blob type is used to provide base64 encoded binary content. The
Expand Down
Loading
Loading