runtime

package
v1.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 23 Imported by: 12

Documentation

Index

Constants

View Source
const (
	BundleDependenciesDir = "/cnab/app/dependencies"
)

Variables

This section is empty.

Functions

func GetDependencyDefinition

func GetDependencyDefinition(c *context.Context, alias string) ([]byte, error)

func GetDependencyDefinitionPath

func GetDependencyDefinitionPath(alias string) string

Types

type ActionInput

type ActionInput struct {
	Steps []*manifest.Step `yaml:"steps"`
	// contains filtered or unexported fields
}

func (*ActionInput) MarshalYAML

func (a *ActionInput) MarshalYAML() (interface{}, error)

MarshalYAML marshals the step nested under the action install:

  • helm3: ...

Solution from https://stackoverflow.com/a/42547226

type PorterRuntime

type PorterRuntime struct {
	*context.Context

	RuntimeManifest *RuntimeManifest
	// contains filtered or unexported fields
}

PorterRuntime orchestrates executing a bundle and managing state.

func NewPorterRuntime

func NewPorterRuntime(cxt *context.Context, mixins pkgmgmt.PackageManager) *PorterRuntime

func (*PorterRuntime) Execute

func (r *PorterRuntime) Execute(rm *RuntimeManifest) error

type RuntimeManifest

type RuntimeManifest struct {
	*context.Context
	*manifest.Manifest

	Action string
	// contains filtered or unexported fields
}

func NewRuntimeManifest

func NewRuntimeManifest(cxt *context.Context, action string, manifest *manifest.Manifest) *RuntimeManifest

func (*RuntimeManifest) ApplyStepOutputs

func (m *RuntimeManifest) ApplyStepOutputs(assignments map[string]string) error

func (*RuntimeManifest) Finalize added in v1.0.1

func (m *RuntimeManifest) Finalize() error

Finalize cleans up the bundle before its completion.

func (*RuntimeManifest) GetInstallationName added in v0.29.1

func (m *RuntimeManifest) GetInstallationName() string

func (*RuntimeManifest) GetOutputs

func (m *RuntimeManifest) GetOutputs() map[string]string

func (*RuntimeManifest) GetSensitiveValues

func (m *RuntimeManifest) GetSensitiveValues() []string

func (*RuntimeManifest) GetSteps

func (m *RuntimeManifest) GetSteps() manifest.Steps

func (*RuntimeManifest) Initialize added in v1.0.1

func (m *RuntimeManifest) Initialize() error

Init prepares the runtime environment prior to step execution

func (*RuntimeManifest) ReadDependencyOutputValue added in v0.28.0

func (m *RuntimeManifest) ReadDependencyOutputValue(ref manifest.DependencyOutputReference) (string, error)

ReadDependencyOutputValue reads the dependency's output using the alias for the dependency from the specified output parameter source (name).

func (*RuntimeManifest) ResolveImages

func (m *RuntimeManifest) ResolveImages(bun cnab.ExtendedBundle, reloMap relocation.ImageRelocationMap) error

ResolveImages updates the RuntimeManifest to properly reflect the image map passed to the bundle via the mounted bundle.json and relocation mapping

func (*RuntimeManifest) ResolveStep

func (m *RuntimeManifest) ResolveStep(step *manifest.Step) error

ResolveStep will walk through the Step's data and resolve any placeholder data using the definitions in the manifest, like parameters or credentials.

func (*RuntimeManifest) Validate

func (m *RuntimeManifest) Validate() error

type StepOutput

type StepOutput struct {
	Name string                 `yaml:"name"`
	Data map[string]interface{} `yaml:",inline"`
	// contains filtered or unexported fields
}

type TestPorterRuntime

type TestPorterRuntime struct {
	*PorterRuntime
	TestContext *context.TestContext
}

func NewTestPorterRuntime

func NewTestPorterRuntime(t *testing.T) *TestPorterRuntime

Jump to

Keyboard shortcuts

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