builder

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 19 Imported by: 3 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// InitPhase --
	InitPhase int32 = 0
	// ProjectGenerationPhase --
	ProjectGenerationPhase int32 = 10
	// ProjectBuildPhase --
	ProjectBuildPhase int32 = 20
	// ApplicationPackagePhase --
	ApplicationPackagePhase int32 = 30
	// ApplicationPublishPhase --
	ApplicationPublishPhase int32 = 40
	// NotifyPhase --
	NotifyPhase int32 = math.MaxInt32
)

Variables

View Source
var DefaultSteps = []Step{
	Steps.CleanBuildDir,
	Steps.GenerateProjectSettings,
	Steps.InjectDependencies,
	Steps.SanitizeDependencies,
	Steps.IncrementalImageContext,
}

DefaultSteps --

View Source
var Steps = steps{
	CleanBuildDir: NewStep(
		ProjectGenerationPhase-1,
		cleanBuildDir,
	),
	GenerateProjectSettings: NewStep(
		ProjectGenerationPhase+1,
		generateProjectSettings,
	),
	InjectDependencies: NewStep(
		ProjectGenerationPhase+2,
		injectDependencies,
	),
	SanitizeDependencies: NewStep(
		ProjectGenerationPhase+3,
		sanitizeDependencies,
	),
	StandardImageContext: NewStep(
		ApplicationPackagePhase,
		standardImageContext,
	),
	IncrementalImageContext: NewStep(
		ApplicationPackagePhase,
		incrementalImageContext,
	),
}

Steps --

Functions

func RegisterSteps

func RegisterSteps(steps interface{})

RegisterSteps --

func StepIDsFor

func StepIDsFor(steps ...Step) []string

StepIDsFor --

Types

type Builder

type Builder interface {
	Run(build v1.BuilderTask) v1.BuildStatus
}

Builder --

func New

func New(c client.Client) Builder

New --

type Context

type Context struct {
	client.Client
	C                 cancellable.Context
	Catalog           *camel.RuntimeCatalog
	Build             v1.BuilderTask
	BaseImage         string
	Image             string
	Digest            string
	Error             error
	Namespace         string
	Path              string
	Artifacts         []v1.Artifact
	SelectedArtifacts []v1.Artifact
	Resources         []Resource

	Maven struct {
		Project      maven.Project
		SettingsData []byte
	}
}

Context --

func (*Context) HasRequiredImage

func (c *Context) HasRequiredImage() bool

HasRequiredImage --

type Resource

type Resource struct {
	Target  string
	Content []byte
}

Resource --

type Step

type Step interface {
	ID() string
	Phase() int32
	Execute(*Context) error
}

Step --

func NewStep

func NewStep(phase int32, task StepTask) Step

NewStep --

type StepTask

type StepTask func(*Context) error

StepTask ---

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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