Documentation ¶
Index ¶
- Constants
- func GetDependencyDefinition(c *portercontext.Context, alias string) ([]byte, error)
- func GetDependencyDefinitionPath(alias string) string
- type ActionInput
- type PorterRuntime
- type RuntimeConfig
- type RuntimeManifest
- func (m *RuntimeManifest) ApplyStepOutputs(assignments map[string]string) error
- func (m *RuntimeManifest) Finalize(ctx context.Context) error
- func (m *RuntimeManifest) GetInstallationName() string
- func (m *RuntimeManifest) GetInstallationNamespace() string
- func (m *RuntimeManifest) GetOutputs() map[string]string
- func (m *RuntimeManifest) GetSensitiveValues() []string
- func (m *RuntimeManifest) GetSteps() manifest.Steps
- func (m *RuntimeManifest) Initialize(ctx context.Context) error
- func (m *RuntimeManifest) ReadDependencyOutputValue(ref manifest.DependencyOutputReference) (string, error)
- func (m *RuntimeManifest) ResolveImages(bun cnab.ExtendedBundle, reloMap relocation.ImageRelocationMap) error
- func (m *RuntimeManifest) ResolveInvocationImage(bun cnab.ExtendedBundle, reloMap relocation.ImageRelocationMap) error
- func (m *RuntimeManifest) ResolveStep(ctx context.Context, stepIndex int, step *manifest.Step) error
- func (m *RuntimeManifest) Validate() error
- type StepOutput
- type TestPorterRuntime
- type TestRuntimeConfig
Constants ¶
const (
BundleDependenciesDir = "/cnab/app/dependencies"
)
Variables ¶
This section is empty.
Functions ¶
func GetDependencyDefinition ¶
func GetDependencyDefinition(c *portercontext.Context, alias string) ([]byte, error)
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 { RuntimeManifest *RuntimeManifest // contains filtered or unexported fields }
PorterRuntime orchestrates executing a bundle and managing state.
func NewPorterRuntime ¶
func NewPorterRuntime(runtimeCfg RuntimeConfig, mixins pkgmgmt.PackageManager) *PorterRuntime
func (*PorterRuntime) Execute ¶
func (r *PorterRuntime) Execute(ctx context.Context, rm *RuntimeManifest) error
func (*PorterRuntime) NewRuntimeManifest ¶ added in v1.0.1
func (r *PorterRuntime) NewRuntimeManifest(action string, m *manifest.Manifest) *RuntimeManifest
type RuntimeConfig ¶ added in v1.0.1
type RuntimeConfig struct { *config.Config // DebugMode indicates if the bundle is running in debug mode. DebugMode bool }
RuntimeConfig is a specialized config.Config with additional runtime-specific settings.
func NewConfig ¶ added in v1.0.1
func NewConfig() RuntimeConfig
NewConfig returns an initialized RuntimeConfig
func NewConfigFor ¶ added in v1.0.1
func NewConfigFor(config *config.Config) RuntimeConfig
NewConfigFor returns an initialized RuntimeConfig using the specified context.
func (RuntimeConfig) ConfigureLogging ¶ added in v1.0.1
type RuntimeManifest ¶
type RuntimeManifest struct { *manifest.Manifest Action string // contains filtered or unexported fields }
func NewRuntimeManifest ¶
func NewRuntimeManifest(cfg RuntimeConfig, 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(ctx context.Context) error
Finalize cleans up the bundle before its completion.
func (*RuntimeManifest) GetInstallationName ¶ added in v0.29.1
func (m *RuntimeManifest) GetInstallationName() string
func (*RuntimeManifest) GetInstallationNamespace ¶ added in v1.0.1
func (m *RuntimeManifest) GetInstallationNamespace() 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(ctx context.Context) error
Initialize 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) ResolveInvocationImage ¶ added in v1.0.1
func (m *RuntimeManifest) ResolveInvocationImage(bun cnab.ExtendedBundle, reloMap relocation.ImageRelocationMap) error
ResolveInvocationImage updates the RuntimeManifest to properly reflect the invocation image passed to the bundle via the mounted bundle.json and relocation mapping
func (*RuntimeManifest) ResolveStep ¶
func (m *RuntimeManifest) ResolveStep(ctx context.Context, stepIndex int, 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 TestPorterRuntime ¶
type TestPorterRuntime struct { *PorterRuntime TestContext *portercontext.TestContext }
func NewTestPorterRuntime ¶
func NewTestPorterRuntime(t *testing.T) *TestPorterRuntime
type TestRuntimeConfig ¶ added in v1.0.1
type TestRuntimeConfig struct { RuntimeConfig TestContext *portercontext.TestContext }
func NewTestRuntimeConfig ¶ added in v1.0.1
func NewTestRuntimeConfig(t *testing.T) TestRuntimeConfig