buildpackapplifecycle

package module
v0.0.0-...-c2bbf19 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 11

README

buildpackapplifecycle

The buildpack lifecycle implements the traditional Cloud Foundry deployment strategy.

The Builder downloads buildpacks and app bits, and produces a droplet.

The Launcher runs the start command using a standard rootfs and environment.

Read about the app lifecycle spec here: https://github.com/cloudfoundry/diego-design-notes#app-lifecycles

[!NOTE]

This repository should be imported as code.cloudfoundry.org/buildpackapplifecycle.

Contributing

See the Contributing.md for more information on how to contribute.

Working Group Charter

This repository is maintained by App Runtime Platform under Diego area.

[!IMPORTANT]

Content in this file is managed by the CI task sync-readme and is generated by CI following a convention.

Documentation

Index

Constants

View Source
const (
	DetectFailMsg          = "None of the buildpacks detected a compatible application"
	CompileFailMsg         = "Failed to compile droplet"
	ReleaseFailMsg         = "Failed to build droplet release"
	SupplyFailMsg          = "Failed to run all supply scripts"
	NoSupplyScriptFailMsg  = "Error: one of the buildpacks chosen to supply dependencies does not support multi-buildpack apps"
	MissingFinalizeWarnMsg = "" /* 158-byte string literal not displayed */
	FinalizeFailMsg        = "Failed to run finalize script"
	DETECT_FAIL_CODE       = 222
	COMPILE_FAIL_CODE      = 223
	RELEASE_FAIL_CODE      = 224
	SUPPLY_FAIL_CODE       = 225
	FINALIZE_FAIL_CODE     = 226
)

Variables

This section is empty.

Functions

func ExitCodeFromError

func ExitCodeFromError(err error) int

Types

type BuildpackConfig

type BuildpackConfig struct {
	EntrypointPrefix string `json:"entrypoint_prefix,omitempty" yaml:"entrypoint_prefix,omitempty"`
}

type BuildpackMetadata

type BuildpackMetadata struct {
	Key     string           `json:"key" yaml:"key"`
	Name    string           `json:"name" yaml:"name"`
	Version string           `json:"version,omitempty" yaml:"version,omitempty"`
	Config  *BuildpackConfig `json:"config,omitempty" yaml:"config,omitempty"`
}

type LifecycleBuilderConfig

type LifecycleBuilderConfig struct {
	*flag.FlagSet

	ExecutablePath string
	// contains filtered or unexported fields
}

func NewLifecycleBuilderConfig

func NewLifecycleBuilderConfig(buildpacks []string, skipDetect bool, skipCertVerify bool) LifecycleBuilderConfig

func (LifecycleBuilderConfig) Args

func (s LifecycleBuilderConfig) Args() []string

func (LifecycleBuilderConfig) BuildArtifactsCacheDir

func (s LifecycleBuilderConfig) BuildArtifactsCacheDir() string

func (LifecycleBuilderConfig) BuildDir

func (s LifecycleBuilderConfig) BuildDir() string

func (LifecycleBuilderConfig) BuildpackOrder

func (s LifecycleBuilderConfig) BuildpackOrder() []string

func (LifecycleBuilderConfig) BuildpackPath

func (s LifecycleBuilderConfig) BuildpackPath(buildpackName string) string

func (LifecycleBuilderConfig) BuildpacksDir

func (s LifecycleBuilderConfig) BuildpacksDir() string

func (LifecycleBuilderConfig) BuildpacksDownloadDir

func (s LifecycleBuilderConfig) BuildpacksDownloadDir() string

func (LifecycleBuilderConfig) CredhubConnectAttempts

func (s LifecycleBuilderConfig) CredhubConnectAttempts() int

func (LifecycleBuilderConfig) CredhubRetryDelay

func (s LifecycleBuilderConfig) CredhubRetryDelay() time.Duration

func (LifecycleBuilderConfig) DepsIndex

func (s LifecycleBuilderConfig) DepsIndex(i int) string

func (LifecycleBuilderConfig) LegacyBuildpackPath

func (s LifecycleBuilderConfig) LegacyBuildpackPath(buildpackName string) string

func (LifecycleBuilderConfig) OutputBuildArtifactsCache

func (s LifecycleBuilderConfig) OutputBuildArtifactsCache() string

func (LifecycleBuilderConfig) OutputDroplet

func (s LifecycleBuilderConfig) OutputDroplet() string

func (LifecycleBuilderConfig) OutputMetadata

func (s LifecycleBuilderConfig) OutputMetadata() string

func (LifecycleBuilderConfig) Path

func (s LifecycleBuilderConfig) Path() string

func (LifecycleBuilderConfig) SkipCertVerify

func (s LifecycleBuilderConfig) SkipCertVerify() bool

func (LifecycleBuilderConfig) SkipDetect

func (s LifecycleBuilderConfig) SkipDetect() bool

func (LifecycleBuilderConfig) SupplyBuildpacks

func (s LifecycleBuilderConfig) SupplyBuildpacks() []string

func (LifecycleBuilderConfig) Validate

func (s LifecycleBuilderConfig) Validate() error

type LifecycleMetadata

type LifecycleMetadata struct {
	BuildpackKey      string              `json:"buildpack_key,omitempty"`
	DetectedBuildpack string              `json:"detected_buildpack"`
	Buildpacks        []BuildpackMetadata `json:"buildpacks"`
}

type Process

type Process struct {
	Type    string `yaml:"type" json:"type"`
	Command string `yaml:"command" json:"command"`
}

type ProcessTypes

type ProcessTypes map[string]string

type Sidecar

type Sidecar struct {
	Name         string   `yaml:"name" json:"name"`
	ProcessTypes []string `yaml:"process_types" json:"process_types"`
	Command      string   `yaml:"command" json:"command"`
	Memory       int      `yaml:"memory,omitempty" json:"memory,omitempty"`
}

type StagingResult

type StagingResult struct {
	LifecycleMetadata `json:"lifecycle_metadata"`
	ProcessTypes      `json:"process_types"`
	ProcessList       []Process `json:"processes,omitempty"`
	Sidecars          []Sidecar `json:"sidecars,omitempty"`
	ExecutionMetadata string    `json:"execution_metadata"`
	LifecycleType     string    `json:"lifecycle_type"`
}

func NewStagingResult

func NewStagingResult(procTypes ProcessTypes, lifeMeta LifecycleMetadata) StagingResult

func UpdateStagingResult

func UpdateStagingResult(result StagingResult, lifeMeta LifecycleMetadata) StagingResult

type ValidationError

type ValidationError []error

func (ValidationError) Append

func (ve ValidationError) Append(err error) ValidationError

func (ValidationError) Empty

func (ve ValidationError) Empty() bool

func (ValidationError) Error

func (ve ValidationError) Error() string

Jump to

Keyboard shortcuts

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