builder

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 38 Imported by: 14

Documentation

Index

Constants

View Source
const (
	ContextDir      = "context"
	DeploymentDir   = "/deployments"
	DependenciesDir = "dependencies"
)
View Source
const (
	// InitPhase --
	InitPhase int32 = 0
	// ProjectGenerationPhase --
	ProjectGenerationPhase int32 = 10
	// ProjectBuildPhase --
	ProjectBuildPhase int32 = 20
	// ApplicationPackagePhase --
	ApplicationPackagePhase int32 = 30
	// ApplicationPublishPhase --
	ApplicationPublishPhase int32 = 40
)
View Source
const KanikoCacheDir = "/kaniko/cache"

KanikoCacheDir is the cache directory for Kaniko builds (mounted into the Kaniko pod)

Variables

View Source
var DefaultSteps = []Step{
	Steps.CleanUpBuildDir,
	Steps.GenerateJavaKeystore,
	Steps.GenerateProjectSettings,
	Steps.InjectDependencies,
	Steps.SanitizeDependencies,
	Steps.IncrementalImageContext,
}
View Source
var QuarkusSteps = []Step{
	quarkus.LoadCamelQuarkusCatalog,
	quarkus.GenerateQuarkusProject,
	quarkus.BuildQuarkusRunner,
	quarkus.ComputeQuarkusDependencies,
}
View Source
var Steps = steps{
	CleanUpBuildDir:         NewStep(ProjectGenerationPhase-1, cleanUpBuildDir),
	GenerateJavaKeystore:    NewStep(ProjectGenerationPhase, generateJavaKeystore),
	GenerateProjectSettings: NewStep(ProjectGenerationPhase+1, generateProjectSettings),
	InjectDependencies:      NewStep(ProjectGenerationPhase+2, injectDependencies),
	SanitizeDependencies:    NewStep(ProjectGenerationPhase+3, sanitizeDependencies),
	StandardImageContext:    NewStep(ApplicationPackagePhase, standardImageContext),
	IncrementalImageContext: NewStep(ApplicationPackagePhase, incrementalImageContext),
}

Functions

func BuildQuarkusRunnerCommon added in v1.4.0

func BuildQuarkusRunnerCommon(ctx context.Context, mc maven.Context, project maven.Project) error

func GenerateQuarkusProjectCommon added in v1.4.0

func GenerateQuarkusProjectCommon(camelQuarkusVersion string, runtimeVersion string, quarkusVersion string) maven.Project

func ProcessQuarkusTransitiveDependencies added in v1.4.0

func ProcessQuarkusTransitiveDependencies(mc maven.Context) ([]v1.Artifact, error)

func StepIDsFor

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

Types

type Build added in v1.4.0

type Build struct {
	// contains filtered or unexported fields
}

func (*Build) Task added in v1.4.0

func (b *Build) Task(task v1.Task) Task

func (*Build) TaskByName added in v1.4.0

func (b *Build) TaskByName(name string) Task

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func New

func New(c client.Client) *Builder

func (*Builder) Build added in v1.4.0

func (b *Builder) Build(build *v1.Build) *Build

type Step

type Step interface {
	ID() string
	Phase() int32
	// contains filtered or unexported methods
}

func NewStep

func NewStep(phase int32, task StepTask) Step

type StepTask

type StepTask func(*builderContext) error

type Task added in v1.4.0

type Task interface {
	Do(ctx context.Context) v1.BuildStatus
}

Jump to

Keyboard shortcuts

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