Documentation
¶
Index ¶
Constants ¶
View Source
const ( StepPush = "push-step" StepWorkloadCreate = "workload-create-step" )
Common step names used across build engines
Variables ¶
This section is empty.
Functions ¶
func EnsureResource ¶
func EnsureResource(ctx context.Context, client client.Client, obj client.Object, resourceType string, logger logr.Logger) error
EnsureResource creates a resource if it doesn't exist This is a common utility function shared across all build engines
func MakeNamespace ¶
func MakeNamespace(build *openchoreov1alpha1.Build) *corev1.Namespace
MakeNamespace creates a namespace for the build
Types ¶
type BuildArtifacts ¶
type BuildArtifacts struct {
// Image is the built container image
Image string
// WorkloadCR is the workload custom resource generated by the build
WorkloadCR string
}
BuildArtifacts contains the artifacts produced by a successful build
type BuildCreationResponse ¶
type BuildCreationResponse struct {
// ID is the unique identifier for the build
ID string
// Created indicates if this was a new build or existing one
Created bool
}
BuildCreationResponse contains information about a created build
type BuildEngine ¶
type BuildEngine interface {
// GetName returns the name of the build engine
GetName() string
// EnsurePrerequisites creates any prerequisite resources needed for the build
EnsurePrerequisites(ctx context.Context, client client.Client, build *openchoreov1alpha1.Build) error
// CreateBuild creates a build workflow/pipeline using the specific engine
CreateBuild(ctx context.Context, client client.Client, build *openchoreov1alpha1.Build) (BuildCreationResponse, error)
// GetBuildStatus retrieves the current status of the build
GetBuildStatus(ctx context.Context, client client.Client, build *openchoreov1alpha1.Build) (BuildStatus, error)
// ExtractBuildArtifacts extracts artifacts (like image name, workload CR) from completed build
ExtractBuildArtifacts(ctx context.Context, client client.Client, build *openchoreov1alpha1.Build) (*BuildArtifacts, error)
}
BuildEngine defines the interface for different build engines (Argo, Tekton, etc.)
type BuildPhase ¶
type BuildPhase string
BuildPhase represents the different phases a build can be in
const ( BuildPhaseRunning BuildPhase = "Running" BuildPhaseSucceeded BuildPhase = "Succeeded" BuildPhaseFailed BuildPhase = "Failed" BuildPhaseUnknown BuildPhase = "Unknown" )
type BuildStatus ¶
type BuildStatus struct {
// Phase represents the current phase of the build
Phase BuildPhase
// Message provides additional details about the current state
Message string
}
BuildStatus represents the current status of a build
Click to show internal directories.
Click to hide internal directories.