componentversions

Usage

ocm check componentversions [<options>] {<component-reference>}

Options

      --fail-on-error      fail on validation error
  -h, --help               help for componentversions
  -R, --local-resources    check also for describing resources with local access method, only
  -S, --local-sources      check also for describing sources with local access method, only
  -o, --output string      output mode (JSON, json, wide, yaml)
      --repo string        repository name or spec
  -s, --sort stringArray   sort fields

Description

This command checks, whether component versions are completely contained in an OCM repository with all its dependent component references.

If the –repo option is specified, the given names are interpreted relative to the specified repository using the syntax

<component>[:<version>]

If no –repo option is specified the given names are interpreted as located OCM component version references:

[<repo type>::]<host>[:<port>][/<base path>]//<component>[:<version>]

Additionally there is a variant to denote common transport archives and general repository specifications

[<repo type>::]<filepath>|<spec json>[//<component>[:<version>]]

The –repo option takes an OCM repository specification:

[<repo type>::]<configured name>|<file path>|<spec json>

For the Common Transport Format the types directory, tar or tgz is possible.

Using the JSON variant any repository types supported by the linked library can be used:

Dedicated OCM repository types:

  • ComponentArchive: v1

OCI Repository types (using standard component repository to OCI mapping):

  • CommonTransportFormat: v1
  • OCIRegistry: v1
  • oci: v1
  • ociRegistry

If the options –local-resources and/or –local-sources are given the check additionally assures that all resources or sources are included into the component version. This means that they are using local access methods, only.

With the option –output the output mode can be selected. The following modes are supported:

  • (default)
  • JSON
  • json
  • wide
  • yaml

Examples


$ ocm check componentversion ghcr.io/open-component-model/ocm//ocm.software/ocmcli:0.17.0
$ ocm check componentversion --repo OCIRegistry::ghcr.io/open-component-model/ocm ocm.software/ocmcli:0.17.0

See Also

  • ocm check — check components in OCM repository