ocm

module
v2.0.0-...-98cc131 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2023 License: Apache-2.0

README

Open Component Model

OpenSSF Best Practices REUSE status OCM Integration Tests

The Open Component Model provides a standard for describing delivery artifacts that can be accessed from many types of component repositories.

OCM Specifications

OCM defines a set of semantic, formatting, and other types of specifications that can be found in the ocm-spec repository. Start learning about the core concepts of OCM elements here.

OCM Library

This project provides a Go library containing an API for interacting with the Open Component Model (OCM) elements and mechanisms.

The library currently supports the following repository mappings:

  • OCI: Use the repository prefix path of an OCI repository to implement an OCM repository.
  • CTF (Common Transport Format): Use a file-based binding to represent any set of component versions as filesystem content (directory, tar, tgz).
  • Component Archive: Compose the content of a component version on the filesystem.

For the usage of the library to access OCM repositories, handle configuratio and credentials see the examples section.

Additionally, OCM provides a generic solution for how to:

  • Sign component versions in any supported OCM repository implementation.
  • Verify signatures based on public keys or verified certificates.
  • Transport component versions, per reference or as values to any of the repository implementations.

OCM CLI

The ocm CLI may also be used to interact with OCM mechanisms. It makes it easy to create component versions and embed them in build processes.

The ocm CLI documentation can be found here.

The code for the CLI can be found in package cmds/ocm.

The OCI and OCM support can be found in packages pkg/contexts/oci and pkg/contexts/ocm.

Examples

An example of how to use the ocm CLI in a Makefile can be found in examples/make.

More comprehensive examples can be taken from the components contained in this repository. Here a complete component build including a multi-arch image is done and finally packaged into a CTF archive which can be tranported into an OCI repository. See the readme files for details.

Contributing

Code contributions, feature requests, bug reports, and help requests are very welcome. Please refer to the Contributing Guide in the Community repository for more information on how to contribute to OCM.

OCM follows the CNCF Code of Conduct.

Licensing

Copyright 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Directories

Path Synopsis
cmds
ocm
examples
lib
hack
pkg
common/accessio/resource
Package resource provides support to implement closeable backing resources featuring multiple separately closeable references.
Package resource provides support to implement closeable backing resources featuring multiple separately closeable references.
contexts/credentials
Package credentials handles the access to credentials for consumers of credential sets.
Package credentials handles the access to credentials for consumers of credential sets.
contexts/oci/ociutils/helm/ignore
Package ignore provides tools for writing ignore files (a la .gitignore).
Package ignore provides tools for writing ignore files (a la .gitignore).
contexts/ocm/accessmethods/plugin
Package plugin is an adapter implementation that provides a generic handling of all AccessMethods provided by plugins.
Package plugin is an adapter implementation that provides a generic handling of all AccessMethods provided by plugins.
contexts/ocm/blobhandler
Package blobhandler contains blobhandlers for handling local blobs for dedicated repository types.
Package blobhandler contains blobhandlers for handling local blobs for dedicated repository types.
contexts/ocm/blobhandler/handlers/oci
Package oci contains sub packages for blob handler implementations for dedicated implementations of the oci go binding interface.
Package oci contains sub packages for blob handler implementations for dedicated implementations of the oci go binding interface.
contexts/ocm/blobhandler/handlers/ocm
Package ocm contains sub packages for blob handler implementations for dedicated implementations of the default ocm go binding interface.
Package ocm contains sub packages for blob handler implementations for dedicated implementations of the default ocm go binding interface.
contexts/ocm/compdesc/normalizations/jsonv1
Package jsonv1 provides a normalization which uses schema specific normalizations.
Package jsonv1 provides a normalization which uses schema specific normalizations.
contexts/ocm/compdesc/normalizations/jsonv2
Package jsonv2 provides a normalization which is completely based on the abstract (internal) version of the component descriptor and is therefore agnostic of the final serialization format.
Package jsonv2 provides a normalization which is completely based on the abstract (internal) version of the component descriptor and is therefore agnostic of the final serialization format.
contexts/ocm/compdesc/versions/ocm.gardener.cloud/v3alpha1/jsonscheme
Package jsonscheme generated by go-bindata.
Package jsonscheme generated by go-bindata.
contexts/ocm/compdesc/versions/ocm.software/v3alpha1/jsonscheme
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../../resources/component-descriptor-ocm-v3-schema.yaml
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../../resources/component-descriptor-ocm-v3-schema.yaml
contexts/ocm/compdesc/versions/v2/jsonscheme
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../resources/component-descriptor-v2-schema.yaml
Package jsonscheme generated by go-bindata.// sources: ../../../../../../../resources/component-descriptor-v2-schema.yaml
contexts/ocm/cpi/support
Package support provides a standard implementation for the object type set required to implement the OCM repository interface.
Package support provides a standard implementation for the object type set required to implement the OCM repository interface.
contexts/ocm/download
Package download provides an API for resource download handlers.
Package download provides an API for resource download handlers.
contexts/ocm/download/handlers/blueprint
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Open Component Model contributors.
// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Open Component Model contributors.
contexts/ocm/plugin
Package plugin maps a Go plugin interface to a technical command line interface.
Package plugin maps a Go plugin interface to a technical command line interface.
contexts/ocm/plugin/cache
Package cache implements the plugin cache that contains all loaded plugins.
Package cache implements the plugin cache that contains all loaded plugins.
contexts/ocm/plugin/descriptor
Package descriptor declares several structs that describe the information that formally describes the capabilities provided by each plugin.
Package descriptor declares several structs that describe the information that formally describes the capabilities provided by each plugin.
contexts/ocm/plugin/ppi
Package ppi provides the plugin programming interface.
Package ppi provides the plugin programming interface.
env
errors
//nolint: errorlint // this is the new As method, also handling error lists
//nolint: errorlint // this is the new As method, also handling error lists
exception
Package exception provides a simple exception mechanism to reduce boilerplate for trivial error forwarding in a function.
Package exception provides a simple exception mechanism to reduce boilerplate for trivial error forwarding in a function.
out
registrations
Package registrations provides a hierarchical namespace for denoting any kind of handlers to be registered on some target.
Package registrations provides a hierarchical namespace for denoting any kind of handlers to be registered on some target.
toi

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL