Transport Component Versions

Prerequisites

Transfer a Component Version

The section Store Component Versions explained how to add a component version to a CTF archive. There, you used the ocm add componentversions command.

To transfer component versions between two OCM repositories, you can use the ocm transfer componentversions command.

Here is an example of a recursive transfer from one OCI registry to another. The transfer includes both resources and references:

ocm transfer componentversion --recursive --copy-resources ghcr.io/open-component-model/ocm//ocm.software/toi/demo/helmdemo:0.12.0 another-registry/
  transferring version "ocm.software/toi/demo/helmdemo:0.12.0"...
    transferring version "ocm.software/toi/installers/helminstaller:0.12.0"...
    ...resource 0 toiimage[ociImage](ocm.software/toi/installers/helminstaller/helminstaller:0.12.0)...
    ...resource 1 toiexecutor[toiExecutor]...
    ...adding component version...
  ...resource 0 package[toiPackage]...
  ...resource 1 chart[helmChart](ocm.software/toi/demo/helmdemo/echoserver:0.1.0)...
  ...resource 2 image[ociImage](google-containers/echoserver:1.10)...
  ...resource 3 config-example[yaml]...
  ...resource 4 creds-example[yaml]...
  ...adding component version...
  2 versions transferred

The OCM CLI’s transfer command can be used to transfer component versions, CTF archives, and artifacts. See ocm transfer -h for more information.

More examples on the transport archive and the common transfer format (CTF) can be found in the ocm-spec.