Skip to content

Commit

Permalink
Update CLI docs (#394)
Browse files Browse the repository at this point in the history
Update OCM CLI documentation for new release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Feb 10, 2025
1 parent 5602f0c commit d62025a
Show file tree
Hide file tree
Showing 14 changed files with 555 additions and 269 deletions.
2 changes: 1 addition & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title = "Open Component Model"
description = ""
leader = "An open standard to describe software artifact delivery."
leader_open_source_text = "Open-Source Apache-2.0 licensed."
latest_version = "v0.19.1"
latest_version = "v0.20.0"
images = ["logo-image.png"]

# mainSections
Expand Down
47 changes: 47 additions & 0 deletions content/docs/cli-reference/add/add_resource-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,29 @@ with the field <code>type</code> in the <code>input</code> field:

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

- Input type <code>git</code>

The repository type allows accessing an arbitrary git repository
using the manifest annotation <code>software.ocm/component-version</code>.
The ref can be used to further specify the branch or tag to checkout, otherwise the remote HEAD is used.

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

This REQUIRED property describes the URL of the git repository to access. All git URL formats are supported.

- **<code>ref</code>** *string*

This OPTIONAL property can be used to specify the remote branch or tag to checkout (commonly called ref).
If not set, the default HEAD (remotes/origin/HEAD) of the remote is used.

- **<code>commit</code>** *string*

This OPTIONAL property can be used to specify the commit hash to checkout.
If not set, the default HEAD of the ref is used.

Options used to configure fields: <code>--inputRepository</code>, <code>--inputVersion</code>

- Input type <code>helm</code>

The path must denote an helm chart archive or directory
Expand Down Expand Up @@ -580,6 +603,30 @@ The access method specification can be put below the <code>access</code> field.
If always requires the field <code>type</code> describing the kind and version
shown below.

- Access type <code>git</code>

This method implements the access of the content of a git commit stored in a
Git repository.

The following versions are supported:
- Version <code>v1alpha1</code>

The type specific specification fields are:

- **<code>repoUrl</code>** *string*

Repository URL with or without scheme.

- **<code>ref</code>** (optional) *string*

Original ref used to get the commit from

- **<code>commit</code>** *string*

The sha/id of the git commit

Options used to configure fields: <code>--accessRepository</code>, <code>--commit</code>, <code>--reference</code>

- Access type <code>gitHub</code>

This method implements the access of the content of a git commit stored in a
Expand Down
47 changes: 47 additions & 0 deletions content/docs/cli-reference/add/add_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,29 @@ with the field <code>type</code> in the <code>input</code> field:

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

- Input type <code>git</code>

The repository type allows accessing an arbitrary git repository
using the manifest annotation <code>software.ocm/component-version</code>.
The ref can be used to further specify the branch or tag to checkout, otherwise the remote HEAD is used.

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

This REQUIRED property describes the URL of the git repository to access. All git URL formats are supported.

- **<code>ref</code>** *string*

This OPTIONAL property can be used to specify the remote branch or tag to checkout (commonly called ref).
If not set, the default HEAD (remotes/origin/HEAD) of the remote is used.

- **<code>commit</code>** *string*

This OPTIONAL property can be used to specify the commit hash to checkout.
If not set, the default HEAD of the ref is used.

Options used to configure fields: <code>--inputRepository</code>, <code>--inputVersion</code>

- Input type <code>helm</code>

The path must denote an helm chart archive or directory
Expand Down Expand Up @@ -592,6 +615,30 @@ The access method specification can be put below the <code>access</code> field.
If always requires the field <code>type</code> describing the kind and version
shown below.

- Access type <code>git</code>

This method implements the access of the content of a git commit stored in a
Git repository.

The following versions are supported:
- Version <code>v1alpha1</code>

The type specific specification fields are:

- **<code>repoUrl</code>** *string*

Repository URL with or without scheme.

- **<code>ref</code>** (optional) *string*

Original ref used to get the commit from

- **<code>commit</code>** *string*

The sha/id of the git commit

Options used to configure fields: <code>--accessRepository</code>, <code>--commit</code>, <code>--reference</code>

- Access type <code>gitHub</code>

This method implements the access of the content of a git commit stored in a
Expand Down
47 changes: 47 additions & 0 deletions content/docs/cli-reference/add/add_source-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,29 @@ with the field <code>type</code> in the <code>input</code> field:

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

- Input type <code>git</code>

The repository type allows accessing an arbitrary git repository
using the manifest annotation <code>software.ocm/component-version</code>.
The ref can be used to further specify the branch or tag to checkout, otherwise the remote HEAD is used.

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

This REQUIRED property describes the URL of the git repository to access. All git URL formats are supported.

- **<code>ref</code>** *string*

This OPTIONAL property can be used to specify the remote branch or tag to checkout (commonly called ref).
If not set, the default HEAD (remotes/origin/HEAD) of the remote is used.

- **<code>commit</code>** *string*

This OPTIONAL property can be used to specify the commit hash to checkout.
If not set, the default HEAD of the ref is used.

Options used to configure fields: <code>--inputRepository</code>, <code>--inputVersion</code>

- Input type <code>helm</code>

The path must denote an helm chart archive or directory
Expand Down Expand Up @@ -580,6 +603,30 @@ The access method specification can be put below the <code>access</code> field.
If always requires the field <code>type</code> describing the kind and version
shown below.

- Access type <code>git</code>

This method implements the access of the content of a git commit stored in a
Git repository.

The following versions are supported:
- Version <code>v1alpha1</code>

The type specific specification fields are:

- **<code>repoUrl</code>** *string*

Repository URL with or without scheme.

- **<code>ref</code>** (optional) *string*

Original ref used to get the commit from

- **<code>commit</code>** *string*

The sha/id of the git commit

Options used to configure fields: <code>--accessRepository</code>, <code>--commit</code>, <code>--reference</code>

- Access type <code>gitHub</code>

This method implements the access of the content of a git commit stored in a
Expand Down
47 changes: 47 additions & 0 deletions content/docs/cli-reference/add/add_sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,29 @@ with the field <code>type</code> in the <code>input</code> field:

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

- Input type <code>git</code>

The repository type allows accessing an arbitrary git repository
using the manifest annotation <code>software.ocm/component-version</code>.
The ref can be used to further specify the branch or tag to checkout, otherwise the remote HEAD is used.

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

This REQUIRED property describes the URL of the git repository to access. All git URL formats are supported.

- **<code>ref</code>** *string*

This OPTIONAL property can be used to specify the remote branch or tag to checkout (commonly called ref).
If not set, the default HEAD (remotes/origin/HEAD) of the remote is used.

- **<code>commit</code>** *string*

This OPTIONAL property can be used to specify the commit hash to checkout.
If not set, the default HEAD of the ref is used.

Options used to configure fields: <code>--inputRepository</code>, <code>--inputVersion</code>

- Input type <code>helm</code>

The path must denote an helm chart archive or directory
Expand Down Expand Up @@ -590,6 +613,30 @@ The access method specification can be put below the <code>access</code> field.
If always requires the field <code>type</code> describing the kind and version
shown below.

- Access type <code>git</code>

This method implements the access of the content of a git commit stored in a
Git repository.

The following versions are supported:
- Version <code>v1alpha1</code>

The type specific specification fields are:

- **<code>repoUrl</code>** *string*

Repository URL with or without scheme.

- **<code>ref</code>** (optional) *string*

Original ref used to get the commit from

- **<code>commit</code>** *string*

The sha/id of the git commit

Options used to configure fields: <code>--accessRepository</code>, <code>--commit</code>, <code>--reference</code>

- Access type <code>gitHub</code>

This method implements the access of the content of a git commit stored in a
Expand Down
2 changes: 1 addition & 1 deletion content/docs/cli-reference/download/download_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ocm download resources [<options>] <component> {<name> { <key>=<value> }}


Download resources of a component version. Resources are specified
by identities. An identity consists of
by identities. An identity consists of
a name argument followed by optional <code>&lt;key>=&lt;value></code>
arguments.

Expand Down
13 changes: 13 additions & 0 deletions content/docs/cli-reference/get/get_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ Matchers exist for the following usage contexts or consumer types:
- <code>key</code>: secret key use to access the credential server


- <code>Git</code>: Git credential matcher

It matches the <code>Git</code> consumer type and additionally acts like
the <code>hostpath</code> type.

Credential consumers of the consumer type Git evaluate the following credential properties:

- <code>username</code>: the basic auth user name
- <code>password</code>: the basic auth password
- <code>token</code>: HTTP token authentication
- <code>privateKey</code>: Private Key authentication certificate


- <code>Github</code>: GitHub credential matcher

This matcher is a hostpath matcher.
Expand Down
30 changes: 26 additions & 4 deletions content/docs/cli-reference/help/configfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ The following configuration types are supported:
&lt;name>: &lt;yaml defining the attribute>
...
</pre>
- <code>blobLimits.ocireg.ocm.config.ocm.software</code>
The config type <code>blobLimits.ocireg.ocm.config.ocm.software</code> can be used to set some
blob layer limits for particular OCI registries used to host OCM repositories.
The <code>blobLimits</code> field maps a OCI registry address to the blob limit to use:

<pre>
type: blobLimits.ocireg.ocm.config.ocm.software
blobLimits:
dummy.io: 65564
dummy.io:8443: 32768 // with :8443 specifying the port and 32768 specifying the byte limit
</pre>

If blob limits apply to a registry, local blobs with a size larger than
the configured limit will be split into several layers with a maximum
size of the given value.

These settings can be overwritten by explicit settings in an OCM
repository specification for those repositories.

The most specific entry will be used. If a registry with a dedicated
port is requested, but no explicit configuration is found, the
setting for the sole hostname is used (if configured).
- <code>cli.ocm.config.ocm.software</code>
The config type <code>cli.ocm.config.ocm.software</code> is used to handle the
main configuration flags of the OCM command line tool.
Expand Down Expand Up @@ -186,12 +208,12 @@ The following configuration types are supported:
reference: # refer to a credential set stored in some other credential repository
type: Credentials # this is a repo providing just one explicit credential set
properties:
username: mandelsoft
password: specialsecret
username: <my-user>
password: <my-secret-password>
- credentialsName: direct
credentials: # direct credential specification
username: mandelsoft2
password: specialsecret2
username: <my-user>
password: <my-secret-password>
</pre>
- <code>merge.config.ocm.software</code>
The config type <code>merge.config.ocm.software</code> can be used to set some
Expand Down
13 changes: 13 additions & 0 deletions content/docs/cli-reference/help/credential-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ The following credential consumer types are used/supported:
- <code>key</code>: secret key use to access the credential server


- <code>Git</code>: Git credential matcher

It matches the <code>Git</code> consumer type and additionally acts like
the <code>hostpath</code> type.

Credential consumers of the consumer type Git evaluate the following credential properties:

- <code>username</code>: the basic auth user name
- <code>password</code>: the basic auth password
- <code>token</code>: HTTP token authentication
- <code>privateKey</code>: Private Key authentication certificate


- <code>Github</code>: GitHub credential matcher

This matcher is a hostpath matcher.
Expand Down
3 changes: 2 additions & 1 deletion content/docs/cli-reference/help/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following *realms* are used by the command line tool:
- <code>ocm/credentials/dockerconfig</code>: docker config handling as credential repository
- <code>ocm/credentials/vault</code>: HashiCorp Vault Access
- <code>ocm/downloader</code>: Downloaders
- <code>ocm/git</code>: git repository
- <code>ocm/maven</code>: Maven repository
- <code>ocm/npm</code>: NPM registry
- <code>ocm/oci/docker</code>: Docker repository handling
Expand All @@ -48,7 +49,7 @@ The following *realms* are used by the command line tool:
- <code>ocm/refcnt</code>: reference counting
- <code>ocm/toi</code>: TOI logging
- <code>ocm/transfer</code>: OCM transfer handling
- <code>ocm/valuemerge</code>: value marge handling
- <code>ocm/valuemerge</code>: value merge handling



Expand Down
24 changes: 24 additions & 0 deletions content/docs/cli-reference/help/ocm-accessmethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,30 @@ The access method specification can be put below the <code>access</code> field.
If always requires the field <code>type</code> describing the kind and version
shown below.

- Access type <code>git</code>

This method implements the access of the content of a git commit stored in a
Git repository.

The following versions are supported:
- Version <code>v1alpha1</code>

The type specific specification fields are:

- **<code>repoUrl</code>** *string*

Repository URL with or without scheme.

- **<code>ref</code>** (optional) *string*

Original ref used to get the commit from

- **<code>commit</code>** *string*

The sha/id of the git commit

Options used to configure fields: <code>--accessRepository</code>, <code>--commit</code>, <code>--reference</code>

- Access type <code>gitHub</code>

This method implements the access of the content of a git commit stored in a
Expand Down
Loading

0 comments on commit d62025a

Please sign in to comment.