Skip to content

make ocm add cv --repository to support OCI registries #578

@ikhandamirov

Description

@ikhandamirov

Description

Currently ocm add cv can only create a component version as a CTF archive. The --repository flag accepts the path to the to be created CTF. The goal of this task to allow the flag to accept also references pointing to OCI registries.

Once implemented, the ocm add cv will be able to store components directly in the requested OCI registry. Both private and public registries should be supported.

See https://github.com/open-component-model/open-component-model/blob/main/cli/cmd/add/component-version/cmd.go --> GetRepositorySpec().

The function hardcodes creation of CFT:

	repoSpec := ctfv1.Repository{
		Path:       repoRef.String(),
		AccessMode: accessMode,
	}

In case of a reference to an OCI registry, the repository spec would have to be created differently:

	repoSpec := ociv1.Repository{
		BaseUrl: repoRef.String(),
	}

Done Criteria

  • ...
  • Code has been reviewed by other team members
  • Analysis of existing tests (Unit and Integration)
  • Unit Tests created for new code or existing Unit Tests updated
  • Integration Test Suite updated (includes deletion of existing unnecessary Integration Test and/or creation of new ones if required)
  • Enduser Documentation, e.g. https://ocm.software/dev/docs/getting-started/create-component-version/ updated.
  • Internal technical Documentation created/updated (if applicable)
  • Successful demonstration in Review

Metadata

Metadata

Assignees

Labels

area/ipceiImportant Project of Common European Interestkind/tasksmall task, normally part of feature or epic

Type

No fields configured for Task.

Projects

Status
🔍 Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions