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
Description
Currently
ocm add cvcan only create a component version as a CTF archive. The--repositoryflag 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 cvwill 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:
In case of a reference to an OCI registry, the repository spec would have to be created differently:
Done Criteria