buildpackapplifecycle

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

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 9 Imported by: 19

README

buildpackapplifecycle

Note: This repository should be imported as code.cloudfoundry.org/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

Running tests

On linux or windows, please use ginkgo -r from this directory.

On a mac, you should use docker to run the tests on a linux machine

$ docker build -f Dockerfile.linux.test -t buildpackapplifecycle .
$ docker run -it buildpackapplifecycle

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 BuildpackMetadata

type BuildpackMetadata struct {
	Key     string `json:"key"`
	Name    string `json:"name"`
	Version string `json:"version,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) DepsIndex

func (s LifecycleBuilderConfig) DepsIndex(i int) 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