builder

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 47 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 BuildahDefaultImageName = "quay.io/buildah/stable"
View Source
const BuildahImage = "BuildahImage"
View Source
const BuildahPlatform = "BuildahPlatform"
View Source
const KanikoBuildCacheEnabled = "KanikoBuildCacheEnabled"
View Source
const KanikoCacheDir = "/kaniko/cache"

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

View Source
const KanikoDefaultExecutorImageName = "gcr.io/kaniko-project/executor"
View Source
const KanikoDefaultWarmerImageName = "gcr.io/kaniko-project/warmer"
View Source
const KanikoExecutorImage = "KanikoExecutorImage"
View Source
const KanikoPVCName = "KanikoPersistentVolumeClaim"
View Source
const KanikoWarmerImage = "KanikoWarmerImage"

Variables

View Source
var Image = imageSteps{
	IncrementalImageContext: NewStep(ApplicationPackagePhase, incrementalImageContext),
	NativeImageContext:      NewStep(ApplicationPackagePhase, nativeImageContext),
	StandardImageContext:    NewStep(ApplicationPackagePhase, standardImageContext),
	ExecutableDockerfile:    NewStep(ApplicationPackagePhase+1, executableDockerfile),
	JvmDockerfile:           NewStep(ApplicationPackagePhase+1, jvmDockerfile),
}
View Source
var Project = projectSteps{
	CleanUpBuildDir:         NewStep(ProjectGenerationPhase-1, cleanUpBuildDir),
	GenerateJavaKeystore:    NewStep(ProjectGenerationPhase, generateJavaKeystore),
	GenerateProjectSettings: NewStep(ProjectGenerationPhase+1, generateProjectSettings),
	InjectDependencies:      NewStep(ProjectGenerationPhase+2, injectDependencies),
	SanitizeDependencies:    NewStep(ProjectGenerationPhase+3, sanitizeDependencies),
}
View Source
var Quarkus = quarkusSteps{
	LoadCamelQuarkusCatalog:    NewStep(InitPhase, loadCamelQuarkusCatalog),
	GenerateQuarkusProject:     NewStep(ProjectGenerationPhase, generateQuarkusProject),
	PrepareProjectWithSources:  NewStep(ProjectBuildPhase-1, prepareProjectWithSources),
	BuildQuarkusRunner:         NewStep(ProjectBuildPhase, buildQuarkusRunner),
	ComputeQuarkusDependencies: NewStep(ProjectBuildPhase+1, computeQuarkusDependencies),
}

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(runtimeVersion string, quarkusVersion string, buildTimeProperties map[string]string) maven.Project

func IsSupportedPublishStrategyOption added in v1.11.0

func IsSupportedPublishStrategyOption(strategy v1.IntegrationPlatformBuildPublishStrategy, name string) bool

IsSupportedPublishStrategyOption indicates whether the given option name is supported for the given strategy.

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 PublishStrategyOption added in v1.11.0

type PublishStrategyOption struct {
	Name string
	// contains filtered or unexported fields
}

func GetSupportedPublishStrategyOptions added in v1.11.0

func GetSupportedPublishStrategyOptions(strategy v1.IntegrationPlatformBuildPublishStrategy) []PublishStrategyOption

GetSupportedPublishStrategyOptions provides the supported options for the given strategy. Returns nil if no options are supported.

func (*PublishStrategyOption) ToString added in v1.11.0

func (o *PublishStrategyOption) ToString() string

type Step

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

func NewStep

func NewStep(phase int32, task StepTask) Step

func StepsFrom added in v1.7.0

func StepsFrom(ids ...string) ([]Step, error)

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