packager

package
v0.9.0-zeta1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CNABVersion1_0_0 is the CNAB Schema version 1.0.0
	CNABVersion1_0_0 = "v1.0.0-WD"
)
View Source
const (
	// DefaultCNABBaseImageName is the name of the default base invocation image.
	DefaultCNABBaseImageName = "docker/cnab-app-base"
)

Variables

This section is empty.

Functions

func BaseInvocationImage added in v0.8.0

func BaseInvocationImage(cli command.Cli) string

BaseInvocationImage returns the name and tag of the CNAB base invocation image

func Extract

func Extract(name string, ops ...func(*types.App) error) (*types.App, error)

Extract extracts the app content if argument is an archive, or does nothing if a dir. It returns source file, effective app name, and cleanup function If appname is empty, it looks into cwd, and all subdirs for a single matching .dockerapp If nothing is found, it looks for an image and loads it

func ExtractCNABParametersValues added in v0.8.0

func ExtractCNABParametersValues(mapping CNABParametersMapping, env []string) map[string]string

ExtractCNABParametersValues extracts the parameter values from the given CNAB environment

func GetNamedTagged

func GetNamedTagged(tag string) (reference.NamedTagged, error)

func Init

func Init(name string, composeFile string) (string, error)

Init is the entrypoint initialization function. It generates a new application definition based on the provided parameters and returns the path to the created application definition.

func MakeBundleFromApp

func MakeBundleFromApp(dockerCli command.Cli, app *types.App, refOverride reference.NamedTagged) (*bundle.Bundle, error)

func MakeCNABImageName

func MakeCNABImageName(appName, appVersion, suffix string) (string, error)

func MakeInvocationImageName

func MakeInvocationImageName(meta metadata.AppMetadata, refOverride reference.NamedTagged) (string, error)

func PackInvocationImageContext added in v0.8.0

func PackInvocationImageContext(cli command.Cli, app *types.App, target io.Writer) error

PackInvocationImageContext creates a Docker build context for building a CNAB invocation image

func PersistInBundleStore

func PersistInBundleStore(ref reference.Reference, bndle *bundle.Bundle) (reference.Reference, error)

func ToCNAB added in v0.8.0

func ToCNAB(app *types.App, invocationImageName string) (*bundle.Bundle, error)

ToCNAB creates a CNAB bundle from an app package

Types

type CNABParametersMapping added in v0.8.0

type CNABParametersMapping struct {
	CNABEnvToParameter map[string]string
	ParameterToCNABEnv map[string]string
}

CNABParametersMapping describes the desired mapping between parameters and CNAB environment variables

func ExtractCNABParameterMapping added in v0.8.0

func ExtractCNABParameterMapping(parameters parameters.Parameters) CNABParametersMapping

ExtractCNABParameterMapping extracts the CNABParametersMapping from application parameters

type DockerAppCustom

type DockerAppCustom struct {
	Version string          `json:"version,omitempty"`
	Payload json.RawMessage `json:"payload,omitempty"`
}

DockerAppCustom contains extension custom data that docker app injects in the bundle.

Jump to

Keyboard shortcuts

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