Skip to content

Migrate to OCM CLI v2 #2059

Description

@Perseus985

Summary

Migrate this repository's component build pipeline from OCM CLI v1 (open-component-model/ocm, v0.42.x) to OCM CLI v2 (open-component-model/open-component-model, v0.6.x).

Why

  • Anyone installing the current OCM CLI release locally gets v2, which is incompatible with our pipeline syntax, leading to confusing "works in CI, fails locally" reports.

Current state

CI uses v1 via this step in .github/workflows/ocm.yaml:

- uses: open-component-model/ocm-setup-action@main
# resolves to https://github.com/open-component-model/ocm latest release → v0.42.x

Constructor templates use Go templating ({{ .VAR }}) and CLI invocations pass --templater=go plus positional -- KEY=VALUE arguments. v2 replaces this with shell-style env var substitution (${VAR}) and a different sub-command surface (e.g. ocm add component-versions instead of ocm add components).

Acceptance criteria

  • CI pulls OCM CLI v2 (pinned to a specific minor, not latest)
  • All constructor templates build successfully under v2 syntax
  • service-component.yaml conditional rendering produces the same two output variants as today (APP_VERSION == 0.0.0 → no image ref; otherwise → image ref present)
  • Existing published components remain pullable; no version-string drift caused by the migration itself
  • docs/release-process.md and docs/ocm-workflow-versioning.md reflect the v2 commands
  • Local developer can install the CLI via the current upstream-recommended path and reproduce CI behavior

Related

Additional Info

Platform Mesh 0.3.0 can be transfered, the Gateway API CRDs (Kubernetes Sigs) Access Type needs to be changed, because in OCM v2 (Github) isnt valid anymore.

  • To be refined

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Blocked/Waiting
Status
In-Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions