Skip to content

Commit 0c33f41

Browse files
committed
docs: add component authoring documentation
<!-- markdownlint-disable MD041 --> Adds comprehensive documentation for component authoring with the new OCM CLI: **New reference pages:** - `reference/component-constructor.md` — field reference for `component-constructor.yaml`, the input format for `ocm add cv` - `reference/component-descriptor.md` — field reference for the component descriptor output format (v2 schema) - `reference/input-and-access-types.md` — field-level reference for all supported input types (`dir`, `file`, `helm/v1`, `utf8`) and access types (`OCIImage`, `localBlob`, `OCIImageLayer`, `Helm`) **New how-to and tutorial:** - `how-to/model-products.md` — step-by-step guide for modeling multi-component products with component references - `tutorials/advanced-component-constructor.md` — tutorial covering multi-component constructors, labels, sources, and nesting patterns **Replaced outdated content:** - Removed `tutorials/complex-component-structure-deployment.md` (replaced by `model-products.md`) - Removed `tutorials/component-descriptor-example.md` (replaced by `component-descriptor.md` reference) - Moved and rewrote `tutorials/input-and-access-types.md` as a reference page, removing types not supported by the new OCM (`binary`, `docker`, `dockermulti`, `ociImage`, `spiff`, `gitHub`, `npm`, `s3`, `wget`) <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes: open-component-model/ocm-project#889 Signed-off-by: Piotr Janik <piotr.janik@sap.com>
1 parent 9637427 commit 0c33f41

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

content/docs/getting-started/create-component-version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,4 +480,4 @@ ocm get cv ghcr.io/open-component-model/ocm//ocm.software/ocmcli:0.35.0 --recurs
480480

481481
## Related Documentation
482482

483-
- [Tutorial: Input and Access Types]({{< relref "input-and-access-types.md" >}}) - Explore all supported resource types and how to use them
483+
- [Reference: Input and Access Types]({{< relref "docs/reference/input-and-access-types.md" >}}) - Explore all supported resource types and how to use them

content/docs/how-to/model-products.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ Enterprise software products rarely ship as a single artifact. They are assemble
1010

1111
This guide shows you how to use OCM component references to create a **versioned bill of materials (BOM)** for a multi-component product, giving your organization a single source of truth for every release.
1212

13-
## You'll end up with
13+
## Goal
14+
15+
{{< callout type="note" >}}
16+
**You will end up with**
1417

1518
- A `component-constructor.yaml` that defines service components and a product-level aggregator
16-
- Component references that pin exact, QA-approved version combinations
19+
- Component references that pin exact version combinations
1720
- A portable [CTF archive]({{< relref "docs/concepts/transfer-concept.md#common-transport-format-ctf" >}}) ready for transfer across registries and air-gapped environments
21+
{{< /callout >}}
1822

19-
## Estimated time
20-
21-
~15 minutes
23+
**Estimated time:** ~15 minutes
2224

2325
## How it works
2426

@@ -36,7 +38,7 @@ A product component uses [`componentReferences`](https://github.com/open-compone
3638
- [OCM CLI]({{< relref "ocm-cli-installation.md" >}}) installed
3739
- Familiarity with [the component constructor]({{< relref "../tutorials/advanced-component-constructor.md" >}})
3840

39-
## Define the Components
41+
## Steps
4042

4143
{{< steps >}}
4244
{{< step >}}
@@ -134,8 +136,6 @@ Each parent component declares `componentReferences` entries that point to its c
134136

135137
> **Note:** `component-constructor.yaml` is the default filename the CLI looks for when no `--constructor` flag is given. The examples below omit the flag because the file uses the default name. If your file has a different name or location, pass `--constructor <path>` explicitly.
136138

137-
138-
139139
{{< steps >}}
140140
{{< step >}}
141141

content/docs/reference/component-constructor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ weight: 11
66
toc: true
77
---
88

9-
The component constructor is a YAML file that describes one or more component versions and their artifacts. It is the input for the `ocm add cv` command, which builds component versions into a [Common Transport Format (CTF)](https://github.com/open-component-model/ocm-spec/blob/main/doc/04-extensions/03-storage-backends/ctf.md) archive.
9+
The component constructor is a YAML file that describes one or more component versions and their artifacts.
1010

11-
**Schema:** [`configuration-schema.yaml`](https://ocm.software/schemas/configuration-schema.yaml) (JSON Schema)
11+
**Schema:** [`schema-2020-12.json`](https://github.com/open-component-model/open-component-model/blob/main/bindings/go/constructor/spec/v1/resources/schema-2020-12.json) (JSON Schema 2020-12)
1212

1313
## Top-Level Structure
1414

@@ -107,7 +107,7 @@ resources:
107107
| `name` | string | yes | Name of the resource. |
108108
| `type` | string | yes | Type of the resource. See [Artifact Types](#artifact-types). |
109109
| `access` | object | yes | Access specification for the resource. See [Access Types](#access-types). |
110-
| `version` | string | yes | Version of the resource (relaxed semver). |
110+
| `version` | string | no | Version of the resource (relaxed semver). Defaults to the component version. |
111111
| `relation` | string | no | Relation of the resource to the component (`local` or `external`). Default: `external`. |
112112
| `extraIdentity` | object | no | Additional identity attributes for the resource. |
113113
| `labels` | array | no | Labels associated with the resource. |

content/docs/reference/component-descriptor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 12
66
toc: true
77
---
88

9-
The component descriptor is a YAML document that formally describes a component version. It is the central data structure of the Open Component Model. Every component version stored in a [component repository](https://github.com/open-component-model/ocm-spec/blob/main/doc/01-model/01-model.md#repositories) is represented by exactly one component descriptor.
9+
The component descriptor is a YAML document that formally describes a component version. It is the central data structure of the Open Component Model. Every component version stored in a [component repository](https://github.com/open-component-model/ocm-spec/blob/main/doc/01-model/01-model.md#component-repositories) is represented by exactly one component descriptor.
1010

1111
**Schema:** [Open Component Model v2 schema](https://github.com/open-component-model/open-component-model/blob/main/bindings/go/descriptor/v2/resources/schema-2020-12.json) (JSON Schema)
1212

content/docs/reference/input-and-access-types.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Embeds a directory as a tar archive.
2727
| `compress` | boolean | no | Compress the tar archive (gzip). |
2828
| `reproducible` | boolean | no | Normalize file attributes (timestamps, permissions) for reproducible digests. Recommended when signing. |
2929
| `preserveDir` | boolean | no | Include the directory itself in the archive. |
30+
| `followSymlinks` | boolean | no | Include the content of symbolic links in the archive. Not yet implemented; accepted for compatibility with previous OCM versions. |
3031
| `excludeFiles` | array of string | no | Glob patterns for files to exclude. |
3132
| `includeFiles` | array of string | no | Glob patterns for files to include. |
3233

content/docs/tutorials/configure-resolvers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ Now that you know how to configure resolvers, you can:
332332
registries, Helm repositories, and more
333333
- [Creating a Component Version]({{< relref "docs/getting-started/create-component-version.md" >}}) — Build component
334334
versions and work with CTF archives
335-
- [Input and Access Types]({{< relref "input-and-access-types.md" >}}) — Reference for resource input types (by value)
335+
- [Input and Access Types]({{< relref "docs/reference/input-and-access-types.md" >}}) — Reference for resource input types (by value)
336336
and access types (by reference)
337337
- [Signing and Verification]({{< relref "signing-and-verification.md" >}}) — Sign and verify component versions with
338338
cryptographic keys

0 commit comments

Comments
 (0)