Documentation
¶
Index ¶
- Constants
- Variables
- func BuildQuarkusRunnerCommon(ctx context.Context, mc maven.Context, project maven.Project) error
- func GenerateQuarkusProjectCommon(runtimeVersion string, quarkusVersion string, ...) maven.Project
- func IsSupportedPublishStrategyOption(strategy v1.IntegrationPlatformBuildPublishStrategy, name string) bool
- func MountSecret(ctx context.Context, c client.Client, namespace, name string) (string, error)
- func ProcessQuarkusTransitiveDependencies(mc maven.Context) ([]v1.Artifact, error)
- func StepIDsFor(steps ...Step) []string
- type Build
- type Builder
- type NativeAdapter
- type NativeSourcesAdapter
- type PublishStrategyOption
- type QuarkusRuntimeNativeAdapter
- type Step
- type StepTask
- type Task
Constants ¶
const ( // ContextDir is the directory used to package the container. ContextDir = "context" // DeploymentDir is the directory used in the runtime application to deploy the artifacts. DeploymentDir = "/deployments" // DependenciesDir is the directory used to store required dependencies. DependenciesDir = "dependencies" )
const ( // InitPhase --. InitPhase int32 = 0 // ProjectGenerationPhase --. ProjectGenerationPhase int32 = 10 // ProjectBuildPhase --. ProjectBuildPhase int32 = 20 // ApplicationPackagePhase --. ApplicationPackagePhase int32 = 30 // ApplicationPublishPhase --. ApplicationPublishPhase int32 = 40 )
const BuildahDefaultBaseImageName = "docker.io/library/eclipse-temurin:17"
const BuildahDefaultImageName = "quay.io/buildah/stable"
const BuildahImage = "BuildahImage"
const BuildahPlatform = "BuildahPlatform"
const KanikoBuildCacheEnabled = "KanikoBuildCacheEnabled"
const KanikoCacheDir = "/kaniko/cache"
KanikoCacheDir is the cache directory for Kaniko builds (mounted into the Kaniko pod).
const KanikoDefaultExecutorImageName = "gcr.io/kaniko-project/executor"
const KanikoDefaultWarmerImageName = "gcr.io/kaniko-project/warmer"
const KanikoExecutorImage = "KanikoExecutorImage"
const KanikoPVCName = "KanikoPersistentVolumeClaim"
const KanikoWarmerImage = "KanikoWarmerImage"
Variables ¶
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), }
Image used to export the steps available on an Image building process.
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), InjectProfiles: NewStep(ProjectGenerationPhase+4, injectProfiles), }
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 IsSupportedPublishStrategyOption ¶
func IsSupportedPublishStrategyOption(strategy v1.IntegrationPlatformBuildPublishStrategy, name string) bool
IsSupportedPublishStrategyOption indicates whether the given option name is supported for the given strategy.
func MountSecret ¶
func StepIDsFor ¶
Types ¶
type Build ¶
type Build struct {
// contains filtered or unexported fields
}
func (*Build) TaskByName ¶
TaskByName return the task identified by the name parameter.
type NativeAdapter ¶ added in v2.1.0
type NativeAdapter struct {
}
NativeAdapter used for Camel Quarkus runtime < 3.5.0.
func (*NativeAdapter) BuildCommands ¶ added in v2.1.0
func (n *NativeAdapter) BuildCommands() string
BuildCommands -- .
func (*NativeAdapter) Directory ¶ added in v2.1.0
func (n *NativeAdapter) Directory() string
Directory -- .
func (*NativeAdapter) NativeMavenProperty ¶ added in v2.1.0
func (n *NativeAdapter) NativeMavenProperty() string
NativeMavenProperty -- .
func (*NativeAdapter) TargetDirectory ¶ added in v2.1.0
func (n *NativeAdapter) TargetDirectory(ctxPath, runner string) string
TargetDirectory -- .
type NativeSourcesAdapter ¶ added in v2.1.0
type NativeSourcesAdapter struct {
}
NativeSourcesAdapter used for Camel Quarkus runtime >= 3.5.0.
func (*NativeSourcesAdapter) BuildCommands ¶ added in v2.1.0
func (n *NativeSourcesAdapter) BuildCommands() string
BuildCommands -- .
func (*NativeSourcesAdapter) Directory ¶ added in v2.1.0
func (n *NativeSourcesAdapter) Directory() string
Directory -- .
func (*NativeSourcesAdapter) NativeMavenProperty ¶ added in v2.1.0
func (n *NativeSourcesAdapter) NativeMavenProperty() string
NativeMavenProperty -- .
func (*NativeSourcesAdapter) TargetDirectory ¶ added in v2.1.0
func (n *NativeSourcesAdapter) TargetDirectory(ctxPath, runner string) string
TargetDirectory -- .
type PublishStrategyOption ¶
type PublishStrategyOption struct {
Name string
// contains filtered or unexported fields
}
func GetSupportedPublishStrategyOptions ¶
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 ¶
func (o *PublishStrategyOption) ToString() string
type QuarkusRuntimeNativeAdapter ¶ added in v2.1.0
type QuarkusRuntimeNativeAdapter interface {
// The commands used to build a native application
BuildCommands() string
// The directory where to execute the command
Directory() string
// The directory where to expect the native compiled artifact
TargetDirectory(ctxPath, runner string) string
// The parameter to use for the maven project
NativeMavenProperty() string
}
QuarkusRuntimeNativeAdapter is used to get the proper Quarkus native configuration which may be different in Camel Quarkus version. It is known that before Camel Quarkus 3.5 there was no support to native-source, and using this interface will adapt the configuration to build natively according the previous configuration.
func QuarkusRuntimeSupport ¶ added in v2.1.0
func QuarkusRuntimeSupport(version string) QuarkusRuntimeNativeAdapter
QuarkusRuntimeSupport is used to get the proper native configuration based on the Camel Quarkus version.