Documentation
¶
Overview ¶
SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
Component describes a component consisting of the git repository url and a version.
func NewFromVersionedElement ¶
func NewFromVersionedElement(e common.VersionedElement) *Component
type ComponentJSON ¶
type ComponentJSON struct {
Version string `json:"version"`
}
ComponentJSON is the object that is written to the elastic search metadata.
type ComponentList ¶
type ComponentList []*Component
ComponentList is a set of multiple components.
func GetComponents ¶
func GetComponents(ctx context.Context, log logr.Logger, cdPath string, repoRef string, opts ...Option) (ComponentList, error)
GetComponents returns a list of all components that are direct or transitive dependencies (the transitive closure) of the component described by the component descriptor stored in a file at cdPath.
repoRef is expected to be an ocm repository reference ([<repo type>::]<host>[:<port>][/<base path>], e.g. ocm::example.com/example). It may be left empty, if one or multiple repositories are specified in the ocm config file (in fact, it has to be left empty, if the repositories configured in the ocm config shall be used). Credentials to the ocm repository can also be set in the .ocmconfig file.
For detailed information, for detailed information on how to configure the ocm config file, check the ocm command line tool help with 'ocm configfile --help'
func GetComponentsFromLocations ¶
func GetComponentsFromLocations(tr *tmv1beta1.Testrun) (ComponentList, error)
GetComponentsFromLocations parses a list of components from a testruns's locations
func (ComponentList) Get ¶
func (c ComponentList) Get(name string) *Component
Get returns the component by its name
func (ComponentList) JSON ¶
func (c ComponentList) JSON() map[string]ComponentJSON
JSON returns the json output for a list of components The list is converted into the format:
{ "component_name": { "version": "0.0.0" } }