v1beta1

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Overview

Package v1beta1 contains API Schema definitions for the build v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=shipwright.io

Package v1beta1 contains API Schema definitions for the build v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=shipwright.io

SPDX-License-Identifier: Apache-2.0

SPDX-License-Identifier: Apache-2.0

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	// BuildDomain is the domain used for all labels and annotations for this resource
	BuildDomain = "build.shipwright.io"

	// LabelBuild is a label key for defining the build name
	LabelBuild = BuildDomain + "/name"

	// LabelBuildGeneration is a label key for defining the build generation
	LabelBuildGeneration = BuildDomain + "/generation"

	// AnnotationBuildRefSecret is an annotation that tells the Build Controller to reconcile on
	// events of the secret only if is referenced by a Build in the same namespace
	AnnotationBuildRefSecret = BuildDomain + "/referenced.secret"

	// AnnotationBuildVerifyRepository tells the Build Controller to check a remote repository. If the annotation is not set
	// or has a value of 'true', the controller triggers the validation. A value of 'false' means the controller
	// will bypass checking the remote repository.
	AnnotationBuildVerifyRepository = BuildDomain + "/verify.repository"
)
View Source
const (
	// BuildRunDomain is the domain used for all labels and annotations for this resource
	BuildRunDomain = "buildrun.shipwright.io"

	// LabelBuildRun is a label key for BuildRuns to define the name of the BuildRun
	LabelBuildRun = BuildRunDomain + "/name"

	// LabelBuildRunGeneration is a label key for BuildRuns to define the generation
	LabelBuildRunGeneration = BuildRunDomain + "/generation"
)
View Source
const (
	// BuildRunStateCancel indicates that the user wants to cancel the BuildRun,
	// if not already canceled or terminated
	BuildRunStateCancel = "BuildRunCanceled"

	// BuildRunStatePodEvicted indicates that if the pods got evicted
	// due to some reason. (Probably ran out of ephemeral storage)
	BuildRunStatePodEvicted = "PodEvicted"
)
View Source
const (
	// BuildStrategyDomain is the domain used for all labels and annotations for this resource
	BuildStrategyDomain = "buildstrategy.shipwright.io"

	// LabelBuildStrategyName is a label key for defining the build strategy name
	LabelBuildStrategyName = BuildStrategyDomain + "/name"

	// LabelBuildStrategyGeneration is a label key for defining the build strategy generation
	LabelBuildStrategyGeneration = BuildStrategyDomain + "/generation"
)
View Source
const (
	// ClusterBuildStrategyDomain is the domain used for all labels and annotations for this resource
	ClusterBuildStrategyDomain = "clusterbuildstrategy.shipwright.io"

	// LabelClusterBuildStrategyName is a label key for defining the cluster build strategy name
	LabelClusterBuildStrategyName = ClusterBuildStrategyDomain + "/name"

	// LabelClusterBuildStrategyGeneration is a label key for defining the cluster build strategy generation
	LabelClusterBuildStrategyGeneration = ClusterBuildStrategyDomain + "/generation"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "shipwright.io", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme is used in the generated kube code
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func ConditionStatusPtr

func ConditionStatusPtr(s corev1.ConditionStatus) *corev1.ConditionStatus

ConditionStatusPtr returns a pointer to the passed ConditionStatus.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Build

type Build struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BuildSpec   `json:"spec"`
	Status BuildStatus `json:"status,omitempty"`
}

Build is the Schema representing a Build definition +kubebuilder:subresource:status +kubebuilder:resource:path=builds,scope=Namespaced +kubebuilder:printcolumn:name="Registered",type="string",JSONPath=".status.registered",description="The register status of the Build" +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.reason",description="The reason of the registered Build, either an error or succeed message" +kubebuilder:printcolumn:name="BuildStrategyKind",type="string",JSONPath=".spec.strategy.kind",description="The BuildStrategy type which is used for this Build" +kubebuilder:printcolumn:name="BuildStrategyName",type="string",JSONPath=".spec.strategy.name",description="The BuildStrategy name which is used for this Build" +kubebuilder:printcolumn:name="CreationTime",type="date",JSONPath=".metadata.creationTimestamp",description="The create time of this Build"

func (*Build) ConvertFrom

func (src *Build) ConvertFrom(ctx context.Context, obj *unstructured.Unstructured) error

ConvertFrom converts a provided v1alpha1.Build object into this v1beta1.Build object.

func (*Build) ConvertTo

func (src *Build) ConvertTo(ctx context.Context, obj *unstructured.Unstructured) error

ConvertTo converts this Build object to v1alpha1 format.

func (*Build) DeepCopy

func (in *Build) DeepCopy() *Build

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.

func (*Build) DeepCopyInto

func (in *Build) DeepCopyInto(out *Build)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Build) DeepCopyObject

func (in *Build) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BuildList

type BuildList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Build `json:"items"`
}

BuildList contains a list of Build

func (*BuildList) DeepCopy

func (in *BuildList) DeepCopy() *BuildList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildList.

func (*BuildList) DeepCopyInto

func (in *BuildList) DeepCopyInto(out *BuildList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildList) DeepCopyObject

func (in *BuildList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BuildReason

type BuildReason string

BuildReason is a type used for populating the Build Status.Reason field

const (
	// SucceedStatus indicates that all validations Succeeded
	SucceedStatus BuildReason = "Succeeded"
	// BuildStrategyNotFound indicates that a namespaced-scope strategy was not found in the namespace
	BuildStrategyNotFound BuildReason = "BuildStrategyNotFound"
	// ClusterBuildStrategyNotFound indicates that a cluster-scope strategy was not found
	ClusterBuildStrategyNotFound BuildReason = "ClusterBuildStrategyNotFound"
	// SetOwnerReferenceFailed indicates that setting ownerReferences between a Build and a BuildRun failed
	SetOwnerReferenceFailed BuildReason = "SetOwnerReferenceFailed"
	// SpecSourceSecretRefNotFound indicates the referenced secret in source is missing
	SpecSourceSecretRefNotFound BuildReason = "SpecSourceSecretRefNotFound"
	// SpecOutputSecretRefNotFound indicates the referenced secret in output is missing
	SpecOutputSecretRefNotFound BuildReason = "SpecOutputSecretRefNotFound"
	// SpecBuilderSecretRefNotFound indicates the referenced secret in builder is missing
	SpecBuilderSecretRefNotFound BuildReason = "SpecBuilderSecretRefNotFound"
	// MultipleSecretRefNotFound indicates that multiple secrets are missing
	MultipleSecretRefNotFound BuildReason = "MultipleSecretRefNotFound"
	// SpecEnvNameCanNotBeBlank indicates that the name for an environment variable is blank
	SpecEnvNameCanNotBeBlank BuildReason = "SpecEnvNameCanNotBeBlank"
	// SpecEnvOnlyOneOfValueOrValueFromMustBeSpecified indicates that both value and valueFrom were specified
	SpecEnvOnlyOneOfValueOrValueFromMustBeSpecified BuildReason = "SpecEnvOnlyOneOfValueOrValueFromMustBeSpecified"
	// RuntimePathsCanNotBeEmpty indicates that the spec.runtime feature is used but the paths were not specified
	RuntimePathsCanNotBeEmpty BuildReason = "RuntimePathsCanNotBeEmpty"
	// RestrictedParametersInUse indicates the definition of reserved shipwright parameters
	RestrictedParametersInUse BuildReason = "RestrictedParametersInUse"
	// WrongParameterValueType indicates that a single value was provided for an array parameter, or vice-versa
	WrongParameterValueType BuildReason = "WrongParameterValueType"
	// UndefinedParameter indicates the definition of param that was not defined in the strategy parameters
	UndefinedParameter BuildReason = "UndefinedParameter"
	// InconsistentParameterValues indicates that parameter values have more than one of configMapValue, secretValue, or value set
	InconsistentParameterValues BuildReason = "InconsistentParameterValues"
	// EmptyArrayItemParameterValues indicates that array parameters contain an item where none of configMapValue, secretValue, or value is set
	EmptyArrayItemParameterValues BuildReason = "EmptyArrayItemParameterValues"
	// IncompleteConfigMapValueParameterValues indicates that a configMapValue is specified where the name or the key is empty
	IncompleteConfigMapValueParameterValues BuildReason = "IncompleteConfigMapValueParameterValues"
	// IncompleteSecretValueParameterValues indicates that a secretValue is specified where the name or the key is empty
	IncompleteSecretValueParameterValues BuildReason = "IncompleteSecretValueParameterValues"
	// RemoteRepositoryUnreachable indicates the referenced repository is unreachable
	RemoteRepositoryUnreachable BuildReason = "RemoteRepositoryUnreachable"
	// BuildNameInvalid indicates the build name is invalid
	BuildNameInvalid BuildReason = "BuildNameInvalid"
	// VolumeDoesNotExist indicates that volume referenced by the Build does not exist, therefore Build cannot be run
	VolumeDoesNotExist BuildReason = "VolumeDoesNotExist"
	// VolumeNotOverridable indicates that volume defined by build is not set as overridable in the strategy
	VolumeNotOverridable BuildReason = "VolumeNotOverridable"
	// UndefinedVolume indicates that volume defined by build is not found in the strategy
	UndefinedVolume BuildReason = "UndefinedVolume"
	// TriggerNameCanNotBeBlank indicates the trigger condition does not have a name
	TriggerNameCanNotBeBlank BuildReason = "TriggerNameCanNotBeBlank"
	// TriggerInvalidType indicates the trigger type is invalid
	TriggerInvalidType BuildReason = "TriggerInvalidType"
	// TriggerInvalidGitHubWebHook indicates the trigger type GitHub is invalid
	TriggerInvalidGitHubWebHook BuildReason = "TriggerInvalidGitHubWebHook"
	// TriggerInvalidImage indicates the trigger type Image is invalid
	TriggerInvalidImage BuildReason = "TriggerInvalidImage"
	// TriggerInvalidPipeline indicates the trigger type Pipeline is invalid
	TriggerInvalidPipeline BuildReason = "TriggerInvalidPipeline"

	// AllValidationsSucceeded indicates a Build was successfully validated
	AllValidationsSucceeded = "all validations succeeded"
)

func BuildReasonPtr

func BuildReasonPtr(s BuildReason) *BuildReason

BuildReasonPtr returns a pointer to the passed BuildReason.

type BuildRetention

type BuildRetention struct {
	// FailedLimit defines the maximum number of failed buildruns that should exist.
	//
	// +optional
	// +kubebuilder:validation:Minimum=1
	FailedLimit *uint `json:"failedLimit,omitempty"`
	// SucceededLimit defines the maximum number of succeeded buildruns that should exist.
	//
	// +optional
	// +kubebuilder:validation:Minimum=1
	SucceededLimit *uint `json:"succeededLimit,omitempty"`
	// TTLAfterFailed defines the maximum duration of time the failed buildrun should exist.
	//
	// +optional
	// +kubebuilder:validation:Format=duration
	TTLAfterFailed *metav1.Duration `json:"ttlAfterFailed,omitempty"`
	// TTLAfterSucceeded defines the maximum duration of time the succeeded buildrun should exist.
	//
	// +optional
	// +kubebuilder:validation:Format=duration
	TTLAfterSucceeded *metav1.Duration `json:"ttlAfterSucceeded,omitempty"`
	// AtBuildDeletion defines if related BuildRuns should be deleted when deleting the Build.
	//
	// +optional
	AtBuildDeletion *bool `json:"atBuildDeletion,omitempty"`
}

BuildRetention struct for buildrun cleanup

func (*BuildRetention) DeepCopy

func (in *BuildRetention) DeepCopy() *BuildRetention

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRetention.

func (*BuildRetention) DeepCopyInto

func (in *BuildRetention) DeepCopyInto(out *BuildRetention)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildRun

type BuildRun struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BuildRunSpec   `json:"spec"`
	Status BuildRunStatus `json:"status,omitempty"`
}

BuildRun is the Schema representing an instance of build execution +kubebuilder:subresource:status +kubebuilder:resource:path=buildruns,scope=Namespaced,shortName=br;brs +kubebuilder:printcolumn:name="Succeeded",type="string",JSONPath=".status.conditions[?(@.type==\"Succeeded\")].status",description="The Succeeded status of the BuildRun" +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type==\"Succeeded\")].reason",description="The Succeeded reason of the BuildRun" +kubebuilder:printcolumn:name="StartTime",type="date",JSONPath=".status.startTime",description="The start time of this BuildRun" +kubebuilder:printcolumn:name="CompletionTime",type="date",JSONPath=".status.completionTime",description="The completion time of this BuildRun"

func (*BuildRun) ConvertFrom

func (src *BuildRun) ConvertFrom(ctx context.Context, obj *unstructured.Unstructured) error

From Alpha

func (*BuildRun) ConvertTo

func (src *BuildRun) ConvertTo(ctx context.Context, obj *unstructured.Unstructured) error

To Alpha

func (*BuildRun) DeepCopy

func (in *BuildRun) DeepCopy() *BuildRun

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRun.

func (*BuildRun) DeepCopyInto

func (in *BuildRun) DeepCopyInto(out *BuildRun)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildRun) DeepCopyObject

func (in *BuildRun) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*BuildRun) HasStarted

func (br *BuildRun) HasStarted() bool

HasStarted returns true if the BuildRun has a valid start time set in its status.

func (*BuildRun) IsCanceled

func (br *BuildRun) IsCanceled() bool

IsCanceled returns true if the BuildRun's spec status is set to BuildRunCanceled state.

func (*BuildRun) IsDone

func (br *BuildRun) IsDone() bool

IsDone returns true if the BuildRun's status indicates that it is done.

func (*BuildRun) IsSuccessful

func (br *BuildRun) IsSuccessful() bool

IsSuccessful returns true if the BuildRun's status indicates that it is done.

type BuildRunList

type BuildRunList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BuildRun `json:"items"`
}

BuildRunList contains a list of BuildRun

func (*BuildRunList) DeepCopy

func (in *BuildRunList) DeepCopy() *BuildRunList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRunList.

func (*BuildRunList) DeepCopyInto

func (in *BuildRunList) DeepCopyInto(out *BuildRunList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildRunList) DeepCopyObject

func (in *BuildRunList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BuildRunRequestedState

type BuildRunRequestedState string

BuildRunRequestedState defines the buildrun state the user can provide to override whatever is the current state.

func BuildRunRequestedStatePtr

func BuildRunRequestedStatePtr(s BuildRunRequestedState) *BuildRunRequestedState

BuildRunRequestedStatePtr returns a pointer to the passed BuildRunRequestedState.

type BuildRunRetention

type BuildRunRetention struct {
	// TTLAfterFailed defines the maximum duration of time the failed buildrun should exist.
	//
	// +optional
	// +kubebuilder:validation:Format=duration
	TTLAfterFailed *metav1.Duration `json:"ttlAfterFailed,omitempty"`
	// TTLAfterSucceeded defines the maximum duration of time the succeeded buildrun should exist.
	//
	// +optional
	// +kubebuilder:validation:Format=duration
	TTLAfterSucceeded *metav1.Duration `json:"ttlAfterSucceeded,omitempty"`
}

BuildRunRetention struct for buildrun cleanup

func (*BuildRunRetention) DeepCopy

func (in *BuildRunRetention) DeepCopy() *BuildRunRetention

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRunRetention.

func (*BuildRunRetention) DeepCopyInto

func (in *BuildRunRetention) DeepCopyInto(out *BuildRunRetention)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildRunSource

type BuildRunSource struct {
	// Type is the BuildRunSource qualifier, the type of the data-source.
	// Only LocalType is supported.
	//
	// +optional
	Type BuildSourceType `json:"type,omitempty"`
	// LocalSource
	//
	LocalSource *Local `json:"local,omitempty"`
}

BuildRunSource describes the local source to use

func (*BuildRunSource) DeepCopy

func (in *BuildRunSource) DeepCopy() *BuildRunSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRunSource.

func (*BuildRunSource) DeepCopyInto

func (in *BuildRunSource) DeepCopyInto(out *BuildRunSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildRunSpec

type BuildRunSpec struct {
	// Build refers to an embedded build specification
	// This field is mandatory
	//
	Build ReferencedBuild `json:"build"`

	// Source refers to the location where the source code is,
	// this could only be a local source
	//
	// +optional
	Source *BuildRunSource `json:"source,omitempty"`

	// ServiceAccount refers to the kubernetes serviceaccount
	// which is used for resource control.
	// Default serviceaccount will be set if it is empty
	//
	// +optional
	ServiceAccount *string `json:"serviceAccount,omitempty"`

	// Timeout defines the maximum run time of this BuildRun.
	//
	// +optional
	// +kubebuilder:validation:Format=duration
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// Params is a list of key/value that could be used
	// to set strategy parameters
	//
	// +optional
	ParamValues []ParamValue `json:"paramValues,omitempty"`

	// Output refers to the location where the generated
	// image would be pushed to. It will overwrite the output image in build spec
	//
	// +optional
	Output *Image `json:"output,omitempty"`

	// State is used for canceling a buildrun (and maybe more later on).
	//
	// +optional
	State *BuildRunRequestedState `json:"state,omitempty"`

	// Env contains additional environment variables that should be passed to the build container
	//
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Contains information about retention params
	// +optional
	Retention *BuildRunRetention `json:"retention,omitempty"`

	// Volumes contains volume Overrides of the BuildStrategy volumes in case those are allowed
	// to be overridden. Must only contain volumes that exist in the corresponding BuildStrategy
	// +optional
	Volumes []BuildVolume `json:"volumes,omitempty"`
}

BuildRunSpec defines the desired state of BuildRun

func (*BuildRunSpec) BuildName

func (buildrunSpec *BuildRunSpec) BuildName() string

BuildName returns the name of the associated build, which can be a referenced build resource or an embedded build specification

func (*BuildRunSpec) ConvertFrom

func (dest *BuildRunSpec) ConvertFrom(orig *v1alpha1.BuildRunSpec) error

func (*BuildRunSpec) DeepCopy

func (in *BuildRunSpec) DeepCopy() *BuildRunSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRunSpec.

func (*BuildRunSpec) DeepCopyInto

func (in *BuildRunSpec) DeepCopyInto(out *BuildRunSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildRunStatus

type BuildRunStatus struct {
	// Source holds the results emitted from the source step
	//
	// +optional
	Source *SourceResult `json:"source,omitempty"`

	// Output holds the results emitted from step definition of an output
	//
	// +optional
	Output *Output `json:"output,omitempty"`

	// Conditions holds the latest available observations of a resource's current state.
	Conditions Conditions `json:"conditions,omitempty"`

	// TaskRunName is the name of the TaskRun responsible for executing this BuildRun.
	//
	// +optional
	TaskRunName *string `json:"taskRunName,omitempty"`

	// StartTime is the time the build is actually started.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is the time the build completed.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// BuildSpec is the Build Spec of this BuildRun.
	// +optional
	BuildSpec *BuildSpec `json:"buildSpec,omitempty"`

	// FailureDetails contains error details that are collected and surfaced from TaskRun
	// +optional
	FailureDetails *FailureDetails `json:"failureDetails,omitempty"`
}

BuildRunStatus defines the observed state of BuildRun

func (*BuildRunStatus) DeepCopy

func (in *BuildRunStatus) DeepCopy() *BuildRunStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRunStatus.

func (*BuildRunStatus) DeepCopyInto

func (in *BuildRunStatus) DeepCopyInto(out *BuildRunStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildRunStatus) GetCondition

func (brs *BuildRunStatus) GetCondition(t Type) *Condition

GetCondition returns a condition based on a type from a list of Conditions

func (*BuildRunStatus) IsFailed

func (brs *BuildRunStatus) IsFailed(t Type) bool

IsFailed returns a condition with a False Status based on a type from a list of Conditions.

func (*BuildRunStatus) SetCondition

func (brs *BuildRunStatus) SetCondition(condition *Condition)

SetCondition updates a list of conditions with the provided condition

type BuildSourceType

type BuildSourceType string

BuildSourceType enumerates build source type names.

const GitType BuildSourceType = "Git"

GitType represents the default build workflow behaviour. Where the source code is `git clone` from a public or private repository

const LocalType BuildSourceType = "Local"

LocalType represents a alternative build workflow that instead of `git clone` the repository, it employs the data uploaded by the user, streamed directly into the POD.

const OCIArtifactType BuildSourceType = "OCI"

OCIArtifactType represents a source code bundle container image to pull. This is where the source code resides.

type BuildSpec

type BuildSpec struct {
	// Source refers to the location where the source code is,
	// this could be a git repository, a local source or an oci
	// artifact
	Source Source `json:"source"`

	// Trigger defines the scenarios where a new build should be triggered.
	//
	// +optional
	Trigger *Trigger `json:"trigger,omitempty"`

	// Strategy references the BuildStrategy to use to build the container
	// image.
	Strategy Strategy `json:"strategy"`

	// Params is a list of key/value that could be used
	// to set strategy parameters
	//
	// +optional
	ParamValues []ParamValue `json:"paramValues,omitempty"`

	// Output refers to the location where the built image would be pushed.
	Output Image `json:"output"`

	// Timeout defines the maximum amount of time the Build should take to execute.
	//
	// +optional
	// +kubebuilder:validation:Format=duration
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// Env contains additional environment variables that should be passed to the build container
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Contains information about retention params
	//
	// +optional
	Retention *BuildRetention `json:"retention,omitempty"`

	// Volumes contains volume Overrides of the BuildStrategy volumes in case those are allowed
	// to be overridden. Must only contain volumes that exist in the corresponding BuildStrategy
	// +optional
	Volumes []BuildVolume `json:"volumes,omitempty"`
}

BuildSpec defines the desired state of Build

func (*BuildSpec) ConvertFrom

func (dest *BuildSpec) ConvertFrom(orig *v1alpha1.BuildSpec) error

func (*BuildSpec) ConvertTo

func (dest *BuildSpec) ConvertTo(bs *v1alpha1.BuildSpec) error

func (*BuildSpec) DeepCopy

func (in *BuildSpec) DeepCopy() *BuildSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSpec.

func (*BuildSpec) DeepCopyInto

func (in *BuildSpec) DeepCopyInto(out *BuildSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildSpec) StrategyName

func (buildSpec *BuildSpec) StrategyName() string

StrategyName returns the name of the configured strategy, or 'undefined' in case the strategy is nil (not set)

type BuildStatus

type BuildStatus struct {
	// The Register status of the Build
	// +optional
	Registered *corev1.ConditionStatus `json:"registered,omitempty"`

	// The reason of the registered Build, it's an one-word camelcase
	// +optional
	Reason *BuildReason `json:"reason,omitempty"`

	// The message of the registered Build, either an error or succeed message
	// +optional
	Message *string `json:"message,omitempty"`
}

BuildStatus defines the observed state of Build

NOTICE: This is deprecated and will be removed in a future release.

func (*BuildStatus) DeepCopy

func (in *BuildStatus) DeepCopy() *BuildStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatus.

func (*BuildStatus) DeepCopyInto

func (in *BuildStatus) DeepCopyInto(out *BuildStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildStrategy

type BuildStrategy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BuildStrategySpec   `json:"spec,omitempty"`
	Status BuildStrategyStatus `json:"status,omitempty"`
}

BuildStrategy is the Schema representing a strategy in the namespace scope to build images from source code. +kubebuilder:subresource:status +kubebuilder:resource:path=buildstrategies,scope=Namespaced,shortName=bs;bss

func (*BuildStrategy) ConvertFrom

func (src *BuildStrategy) ConvertFrom(ctx context.Context, obj *unstructured.Unstructured) error

ConvertFrom converts from v1alpha1.BuildStrategy into this object.

func (*BuildStrategy) ConvertTo

func (src *BuildStrategy) ConvertTo(ctx context.Context, obj *unstructured.Unstructured) error

ConvertTo converts this object to its v1alpha1 equivalent

func (*BuildStrategy) DeepCopy

func (in *BuildStrategy) DeepCopy() *BuildStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategy.

func (*BuildStrategy) DeepCopyInto

func (in *BuildStrategy) DeepCopyInto(out *BuildStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildStrategy) DeepCopyObject

func (in *BuildStrategy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (BuildStrategy) GetAnnotations

func (s BuildStrategy) GetAnnotations() map[string]string

GetAnnotations returns the annotations of the build strategy

func (BuildStrategy) GetBuildSteps

func (s BuildStrategy) GetBuildSteps() []Step

GetBuildSteps returns the spec build steps of the build strategy

func (BuildStrategy) GetGeneration

func (s BuildStrategy) GetGeneration() int64

GetGeneration returns the current generation sequence number of the build strategy resource

func (BuildStrategy) GetName

func (s BuildStrategy) GetName() string

GetName returns the name of the build strategy

func (BuildStrategy) GetParameters

func (s BuildStrategy) GetParameters() []Parameter

GetParameters returns the parameters defined by the build strategy

func (BuildStrategy) GetResourceLabels

func (s BuildStrategy) GetResourceLabels() map[string]string

GetResourceLabels returns labels that define the build strategy name and generation to be used in labels map of a resource

func (BuildStrategy) GetSecurityContext

func (s BuildStrategy) GetSecurityContext() *BuildStrategySecurityContext

GetSecurityContext returns the security context defined by the build strategy

func (BuildStrategy) GetVolumes

func (s BuildStrategy) GetVolumes() []BuildStrategyVolume

GetVolumes returns the volumes defined by the build strategy

type BuildStrategyKind

type BuildStrategyKind string

BuildStrategyKind defines the type of BuildStrategy used by the build.

const (
	// NamespacedBuildStrategyKind indicates that the buildstrategy type has a namespaced scope.
	NamespacedBuildStrategyKind BuildStrategyKind = "BuildStrategy"

	// ClusterBuildStrategyKind indicates that buildstrategy type has a cluster scope.
	ClusterBuildStrategyKind BuildStrategyKind = "ClusterBuildStrategy"
)

type BuildStrategyList

type BuildStrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BuildStrategy `json:"items"`
}

BuildStrategyList contains a list of BuildStrategy

func (*BuildStrategyList) DeepCopy

func (in *BuildStrategyList) DeepCopy() *BuildStrategyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategyList.

func (*BuildStrategyList) DeepCopyInto

func (in *BuildStrategyList) DeepCopyInto(out *BuildStrategyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BuildStrategyList) DeepCopyObject

func (in *BuildStrategyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BuildStrategySecurityContext

type BuildStrategySecurityContext struct {

	// The UID to run the entrypoint of the container process.
	// Defaults to user specified in image metadata if unspecified.
	// Can be overwritten by the security context on the step level.
	RunAsUser int64 `json:"runAsUser"`

	// The GID to run the entrypoint of the container process.
	// Defaults to group specified in image metadata if unspecified.
	// Can be overwritten by the security context on the step level.
	RunAsGroup int64 `json:"runAsGroup"`
}

BuildStrategySecurityContext defines a UID and GID for the build that is to be used for the build strategy steps as well as for shipwright-managed steps such as the source retrieval, or the image processing. The value can be overwritten on the steps for the strategy steps. If omitted, then UID and GID from the Shipwright configuration will be used for the shipwright-managed steps.

func (*BuildStrategySecurityContext) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategySecurityContext.

func (*BuildStrategySecurityContext) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildStrategySpec

type BuildStrategySpec struct {
	Steps           []Step                        `json:"steps,omitempty"`
	Parameters      []Parameter                   `json:"parameters,omitempty"`
	SecurityContext *BuildStrategySecurityContext `json:"securityContext,omitempty"`
	Volumes         []BuildStrategyVolume         `json:"volumes,omitempty"`
}

BuildStrategySpec defines the desired state of BuildStrategy

func (*BuildStrategySpec) ConvertFrom

func (src *BuildStrategySpec) ConvertFrom(bs v1alpha1.BuildStrategySpec)

func (*BuildStrategySpec) ConvertTo

func (src *BuildStrategySpec) ConvertTo(bs *v1alpha1.BuildStrategySpec)

func (*BuildStrategySpec) DeepCopy

func (in *BuildStrategySpec) DeepCopy() *BuildStrategySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategySpec.

func (*BuildStrategySpec) DeepCopyInto

func (in *BuildStrategySpec) DeepCopyInto(out *BuildStrategySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildStrategyStatus

type BuildStrategyStatus struct {
}

BuildStrategyStatus defines the observed state of BuildStrategy

func (*BuildStrategyStatus) DeepCopy

func (in *BuildStrategyStatus) DeepCopy() *BuildStrategyStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategyStatus.

func (*BuildStrategyStatus) DeepCopyInto

func (in *BuildStrategyStatus) DeepCopyInto(out *BuildStrategyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildStrategyVolume

type BuildStrategyVolume struct {
	// Indicates that this Volume can be overridden in a Build or BuildRun.
	// Defaults to false
	// +optional
	Overridable *bool `json:"overridable,omitempty"`

	// Name of the Build Volume
	// +required
	Name string `json:"name"`

	// Description of the Build Volume
	// +optional
	Description *string `json:"description,omitempty"`

	// Represents the source of a volume to mount
	// +required
	corev1.VolumeSource `json:",inline"`
}

BuildStrategyVolume is a volume that will be mounted in build pod during build step of the Build Strategy

func (*BuildStrategyVolume) DeepCopy

func (in *BuildStrategyVolume) DeepCopy() *BuildStrategyVolume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategyVolume.

func (*BuildStrategyVolume) DeepCopyInto

func (in *BuildStrategyVolume) DeepCopyInto(out *BuildStrategyVolume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuildVolume

type BuildVolume struct {
	// Name of the Build Volume
	// +required
	Name string `json:"name"`

	// Represents the source of a volume to mount
	// +required
	corev1.VolumeSource `json:",inline"`
}

BuildVolume is a volume that will be mounted in build pod during build step

func (*BuildVolume) DeepCopy

func (in *BuildVolume) DeepCopy() *BuildVolume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildVolume.

func (*BuildVolume) DeepCopyInto

func (in *BuildVolume) DeepCopyInto(out *BuildVolume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuilderStrategy

type BuilderStrategy interface {
	GetAnnotations() map[string]string
	GetName() string
	GetGeneration() int64
	GetResourceLabels() map[string]string
	GetBuildSteps() []Step
	GetParameters() []Parameter
	GetSecurityContext() *BuildStrategySecurityContext
	GetVolumes() []BuildStrategyVolume
}

BuilderStrategy defines the common elements of build strategies

type ClusterBuildStrategy

type ClusterBuildStrategy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BuildStrategySpec   `json:"spec,omitempty"`
	Status BuildStrategyStatus `json:"status,omitempty"`
}

ClusterBuildStrategy is the Schema representing a strategy in the cluster scope to build images from source code. +kubebuilder:subresource:status +kubebuilder:resource:path=clusterbuildstrategies,scope=Cluster,shortName=cbs;cbss

func (*ClusterBuildStrategy) ConvertFrom

func (src *ClusterBuildStrategy) ConvertFrom(ctx context.Context, obj *unstructured.Unstructured) error

ConvertFrom converts v1alpha1.ClusterBuildStrategy into this object

func (*ClusterBuildStrategy) ConvertTo

ConvertTo converts this object to its v1alpha1 equivalent

func (*ClusterBuildStrategy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBuildStrategy.

func (*ClusterBuildStrategy) DeepCopyInto

func (in *ClusterBuildStrategy) DeepCopyInto(out *ClusterBuildStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterBuildStrategy) DeepCopyObject

func (in *ClusterBuildStrategy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ClusterBuildStrategy) GetAnnotations

func (s ClusterBuildStrategy) GetAnnotations() map[string]string

GetAnnotations returns the annotations of the build strategy

func (ClusterBuildStrategy) GetBuildSteps

func (s ClusterBuildStrategy) GetBuildSteps() []Step

GetBuildSteps returns the spec build steps of the build strategy

func (ClusterBuildStrategy) GetGeneration

func (s ClusterBuildStrategy) GetGeneration() int64

GetGeneration returns the current generation sequence number of the build strategy resource

func (ClusterBuildStrategy) GetName

func (s ClusterBuildStrategy) GetName() string

GetName returns the name of the build strategy

func (ClusterBuildStrategy) GetParameters

func (s ClusterBuildStrategy) GetParameters() []Parameter

GetParameters returns the parameters defined by the build strategy

func (ClusterBuildStrategy) GetResourceLabels

func (s ClusterBuildStrategy) GetResourceLabels() map[string]string

GetResourceLabels returns labels that define the build strategy name and generation to be used in labels map of a resource

func (ClusterBuildStrategy) GetSecurityContext

func (s ClusterBuildStrategy) GetSecurityContext() *BuildStrategySecurityContext

GetSecurityContext returns the security context defined by the build strategy

func (ClusterBuildStrategy) GetVolumes

func (s ClusterBuildStrategy) GetVolumes() []BuildStrategyVolume

GetVolumes returns the volumes defined by the build strategy

type ClusterBuildStrategyList

type ClusterBuildStrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterBuildStrategy `json:"items"`
}

ClusterBuildStrategyList contains a list of ClusterBuildStrategy

func (*ClusterBuildStrategyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBuildStrategyList.

func (*ClusterBuildStrategyList) DeepCopyInto

func (in *ClusterBuildStrategyList) DeepCopyInto(out *ClusterBuildStrategyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterBuildStrategyList) DeepCopyObject

func (in *ClusterBuildStrategyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Condition

type Condition struct {
	// Type of condition
	// +required
	Type Type `json:"type" description:"type of status condition"`

	// Status of the condition, one of True, False, Unknown.
	// +required
	Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"`

	// LastTransitionTime last time the condition transit from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime" description:"last time the condition transit from one status to another"`

	// The reason for the condition last transition.
	Reason string `json:"reason" description:"one-word CamelCase reason for the condition's last transition"`

	// A human readable message indicating details about the transition.
	Message string `json:"message" description:"human-readable message indicating details about last transition"`
}

Condition defines the required fields for populating Build controllers Conditions

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Condition) GetMessage

func (c *Condition) GetMessage() string

GetMessage returns the condition Message, it ensures that by getting the Message the call will not panic if the Condition is not present

func (*Condition) GetReason

func (c *Condition) GetReason() string

GetReason returns the condition Reason, it ensures that by getting the Reason the call will not panic if the Condition is not present

func (*Condition) GetStatus

func (c *Condition) GetStatus() corev1.ConditionStatus

GetStatus returns the condition Status, it ensures that by getting the Status the call will not panic if the Condition is not present

type Conditions

type Conditions []Condition

Conditions defines a list of Condition

func (Conditions) DeepCopy

func (in Conditions) DeepCopy() Conditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.

func (Conditions) DeepCopyInto

func (in Conditions) DeepCopyInto(out *Conditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FailureDetails

type FailureDetails struct {
	Reason   string    `json:"reason,omitempty"`
	Message  string    `json:"message,omitempty"`
	Location *Location `json:"location,omitempty"`
}

FailureDetails describes an error while building images

func (*FailureDetails) DeepCopy

func (in *FailureDetails) DeepCopy() *FailureDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDetails.

func (*FailureDetails) DeepCopyInto

func (in *FailureDetails) DeepCopyInto(out *FailureDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Git

type Git struct {
	// URL describes the URL of the Git repository.
	//
	// +optional
	URL *string `json:"url,omitempty"`

	// Revision describes the Git revision (e.g., branch, tag, commit SHA,
	// etc.) to fetch.
	//
	// If not defined, it will fallback to the repository's default branch.
	//
	// +optional
	Revision *string `json:"revision,omitempty"`

	// CloneSecret references a Secret that contains credentials to access
	// the repository.
	//
	// +optional
	CloneSecret *string `json:"cloneSecret,omitempty"`
}

Git describes the git repository to pull

func (*Git) DeepCopy

func (in *Git) DeepCopy() *Git

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Git.

func (*Git) DeepCopyInto

func (in *Git) DeepCopyInto(out *Git)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitHubEventName

type GitHubEventName string

GitHubEventName set of WhenGitHub valid event names.

const (
	// GitHubPullRequestEvent github pull-request event name.
	GitHubPullRequestEvent GitHubEventName = "PullRequest"

	// GitHubPushEvent git push webhook event name.
	GitHubPushEvent GitHubEventName = "Push"
)

type GitSourceResult

type GitSourceResult struct {
	// CommitSha holds the commit sha of git source
	CommitSha string `json:"commitSha,omitempty"`

	// CommitAuthor holds the commit author of a git source
	CommitAuthor string `json:"commitAuthor,omitempty"`

	// BranchName holds the default branch name of the git source
	// this will be set only when revision is not specified in Build object
	//
	// +optional
	BranchName string `json:"branchName,omitempty"`
}

GitSourceResult holds the results emitted from the git source

func (*GitSourceResult) DeepCopy

func (in *GitSourceResult) DeepCopy() *GitSourceResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSourceResult.

func (*GitSourceResult) DeepCopyInto

func (in *GitSourceResult) DeepCopyInto(out *GitSourceResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Image

type Image struct {
	// Image is the reference of the image.
	Image string `json:"image"`

	// Insecure defines whether the registry is not secure
	//
	// +optional
	Insecure *bool `json:"insecure,omitempty"`

	// Describes the secret name for pushing a container image.
	//
	// +optional
	PushSecret *string `json:"pushSecret,omitempty"`

	// Annotations references the additional annotations to be applied on the image
	//
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels references the additional labels to be applied on the image
	//
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
}

Image refers to an container image with credentials

func (*Image) DeepCopy

func (in *Image) DeepCopy() *Image

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.

func (*Image) DeepCopyInto

func (in *Image) DeepCopyInto(out *Image)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Local

type Local struct {
	// Timeout how long the BuildSource execution must take.
	//
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// Name of the local step
	Name string `json:"name,omitempty"`
}

func (*Local) DeepCopy

func (in *Local) DeepCopy() *Local

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Local.

func (*Local) DeepCopyInto

func (in *Local) DeepCopyInto(out *Local)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Location

type Location struct {
	Pod       string `json:"pod,omitempty"`
	Container string `json:"container,omitempty"`
}

Location describes the location where the failure happened

func (*Location) DeepCopy

func (in *Location) DeepCopy() *Location

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Location.

func (*Location) DeepCopyInto

func (in *Location) DeepCopyInto(out *Location)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OCIArtifact

type OCIArtifact struct {
	// Image reference, i.e. quay.io/org/image:tag
	Image string `json:"image"`

	// Prune specifies whether the image is suppose to be deleted. Allowed
	// values are 'Never' (no deletion) and `AfterPull` (removal after the
	// image was successfully pulled from the registry).
	//
	// If not defined, it defaults to 'Never'.
	//
	// +optional
	Prune *PruneOption `json:"prune,omitempty"`
	// PullSecret references a Secret that contains credentials to access
	// the repository.
	//
	// +optional
	PullSecret *string `json:"pullSecret,omitempty"`
}

OCIArtifact describes the source code bundle container to pull

func (*OCIArtifact) DeepCopy

func (in *OCIArtifact) DeepCopy() *OCIArtifact

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIArtifact.

func (*OCIArtifact) DeepCopyInto

func (in *OCIArtifact) DeepCopyInto(out *OCIArtifact)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectKeyRef

type ObjectKeyRef struct {

	// Name of the object
	// +required
	Name string `json:"name"`

	// Key inside the object
	// +required
	Key string `json:"key"`

	// An optional format to add pre- or suffix to the object value. For example 'KEY=${SECRET_VALUE}' or 'KEY=${CONFIGMAP_VALUE}' depending on the context.
	// +optional
	Format *string `json:"format"`
}

func (*ObjectKeyRef) DeepCopy

func (in *ObjectKeyRef) DeepCopy() *ObjectKeyRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectKeyRef.

func (*ObjectKeyRef) DeepCopyInto

func (in *ObjectKeyRef) DeepCopyInto(out *ObjectKeyRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OciArtifactSourceResult

type OciArtifactSourceResult struct {
	// Digest hold the image digest result
	Digest string `json:"digest,omitempty"`
}

OciArtifactSourceResult holds the results emitted from the bundle source

func (*OciArtifactSourceResult) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OciArtifactSourceResult.

func (*OciArtifactSourceResult) DeepCopyInto

func (in *OciArtifactSourceResult) DeepCopyInto(out *OciArtifactSourceResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Output

type Output struct {
	// Digest holds the digest of output image
	//
	// +optional
	Digest string `json:"digest,omitempty"`

	// Size holds the compressed size of output image
	//
	// +optional
	Size int64 `json:"size,omitempty"`
}

Output holds the information about the container image that the BuildRun built

func (*Output) DeepCopy

func (in *Output) DeepCopy() *Output

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Output.

func (*Output) DeepCopyInto

func (in *Output) DeepCopyInto(out *Output)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ParamValue

type ParamValue struct {

	// Inline the properties of a value
	// +optional
	*SingleValue `json:",inline"`

	// Name of the parameter
	// +required
	Name string `json:"name"`

	// Values of an array parameter
	// +optional
	Values []SingleValue `json:"values,omitempty"`
}

ParamValue is a key/value that populates a strategy parameter used in the execution of the strategy steps

func (*ParamValue) DeepCopy

func (in *ParamValue) DeepCopy() *ParamValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamValue.

func (*ParamValue) DeepCopyInto

func (in *ParamValue) DeepCopyInto(out *ParamValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Parameter

type Parameter struct {
	// Name of the parameter
	// +required
	Name string `json:"name"`

	// Description on the parameter purpose
	// +required
	Description string `json:"description"`

	// Type of the parameter. The possible types are "string" and "array",
	// and "string" is the default.
	// +optional
	Type ParameterType `json:"type,omitempty"`

	// Default value for a string parameter
	// +optional
	Default *string `json:"default,omitempty"`

	// Default values for an array parameter
	// +optional
	Defaults *[]string `json:"defaults"`
}

Parameter holds a name-description with a default value that allows strategy steps to be parameterize. Build users can set a value for parameter via the Build or BuildRun spec.paramValues object. +optional

func (*Parameter) DeepCopy

func (in *Parameter) DeepCopy() *Parameter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.

func (*Parameter) DeepCopyInto

func (in *Parameter) DeepCopyInto(out *Parameter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ParameterType

type ParameterType string

ParameterType indicates the type of a parameter

const (
	ParameterTypeString ParameterType = "string"
	ParameterTypeArray  ParameterType = "array"
)

Valid ParamTypes:

type PruneOption

type PruneOption string

PruneOption defines the supported options for image pruning

const (
	// Do not delete image after it was pulled
	PruneNever PruneOption = "Never"

	// Delete image after it was successfully pulled
	PruneAfterPull PruneOption = "AfterPull"
)

type ReferencedBuild

type ReferencedBuild struct {
	// Build refers to an embedded build specification
	//
	// +optional
	Build *BuildSpec `json:"spec,omitempty"`

	// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
	//
	// +optional
	Name *string `json:"name,omitempty"`
}

func (*ReferencedBuild) DeepCopy

func (in *ReferencedBuild) DeepCopy() *ReferencedBuild

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReferencedBuild.

func (*ReferencedBuild) DeepCopyInto

func (in *ReferencedBuild) DeepCopyInto(out *ReferencedBuild)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SingleValue

type SingleValue struct {

	// The value of the parameter
	// +optional
	Value *string `json:"value"`

	// The ConfigMap value of the parameter
	// +optional
	ConfigMapValue *ObjectKeyRef `json:"configMapValue"`

	// The secret value of the parameter
	// +optional
	SecretValue *ObjectKeyRef `json:"secretValue"`
}

The value type contains the properties for a value, this allows for an easy extension in the future to support more kinds

func (*SingleValue) DeepCopy

func (in *SingleValue) DeepCopy() *SingleValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SingleValue.

func (*SingleValue) DeepCopyInto

func (in *SingleValue) DeepCopyInto(out *SingleValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Source

type Source struct {
	// Type is the BuildSource qualifier, the type of the data-source.
	//
	// +optional
	Type BuildSourceType `json:"type,omitempty"`

	// ContextDir is a path to subfolder in the repo. Optional.
	//
	// +optional
	ContextDir *string `json:"contextDir,omitempty"`

	// OCIArtifact
	//
	// +optional
	OCIArtifact *OCIArtifact `json:"ociArtifact,omitempty"`

	// GitSource
	//
	// +optional
	GitSource *Git `json:"git,omitempty"`

	// LocalSource
	//
	// +optional
	LocalSource *Local `json:"local,omitempty"`
}

Source describes the Git source repository to fetch.

func (*Source) DeepCopy

func (in *Source) DeepCopy() *Source

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source.

func (*Source) DeepCopyInto

func (in *Source) DeepCopyInto(out *Source)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SourceResult

type SourceResult struct {

	// Git holds the results emitted from the
	// source step of type git
	//
	// +optional
	Git *GitSourceResult `json:"git,omitempty"`

	// OciArtifact holds the results emitted from
	// the source step of type ociArtifact
	//
	// +optional
	OciArtifact *OciArtifactSourceResult `json:"ociArtifact,omitempty"`
}

SourceResult holds the results emitted from the different sources

func (*SourceResult) DeepCopy

func (in *SourceResult) DeepCopy() *SourceResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceResult.

func (*SourceResult) DeepCopyInto

func (in *SourceResult) DeepCopyInto(out *SourceResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Step

type Step struct {
	// Name of the container specified as a DNS_LABEL.
	// Each container in a pod must have a unique name (DNS_LABEL).
	// Cannot be updated.
	Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
	// Container image name.
	// More info: https://kubernetes.io/docs/concepts/containers/images
	// This field is optional to allow higher level config management to default or override
	// container images in workload controllers like Deployments and StatefulSets.
	// +optional
	Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
	// Entrypoint array. Not executed within a shell.
	// The container image's ENTRYPOINT is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
	// produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
	// of whether the variable exists or not. Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	// +optional
	Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
	// Arguments to the entrypoint.
	// The container image's CMD is used if this is not provided.
	// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
	// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
	// produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
	// of whether the variable exists or not. Cannot be updated.
	// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
	// +optional
	Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"`
	// Container's working directory.
	// If not specified, the container runtime's default will be used, which
	// might be configured in the container image.
	// Cannot be updated.
	// +optional
	WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"`
	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"`
	// Compute Resources required by this container.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
	// Pod volumes to mount into the container's filesystem.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=mountPath
	// +patchStrategy=merge
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
	// Image pull policy.
	// One of Always, Never, IfNotPresent.
	// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
	// SecurityContext defines the security options the container should be run with.
	// If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"`
}

BuildStep defines a partial step that needs to run in container for building the image. If the build step declares a volumeMount, Shipwright will create an emptyDir volume mount for the named volume. Build steps which share the same named volume in the volumeMount will share the same underlying emptyDir volume. This behavior is deprecated, and will be removed when full volume support is added to build strategies as specified in SHIP-0022.

func (*Step) DeepCopy

func (in *Step) DeepCopy() *Step

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Strategy

type Strategy struct {
	// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name"`

	// BuildStrategyKind indicates the kind of the buildstrategy, namespaced or cluster scoped.
	Kind *BuildStrategyKind `json:"kind,omitempty"`
}

Strategy can be used to refer to a specific instance of a buildstrategy. Copied from CrossVersionObjectReference: https://github.com/kubernetes/kubernetes/blob/169df7434155cbbc22f1532cba8e0a9588e29ad8/pkg/apis/autoscaling/types.go#L64

func (*Strategy) DeepCopy

func (in *Strategy) DeepCopy() *Strategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Strategy.

func (*Strategy) DeepCopyInto

func (in *Strategy) DeepCopyInto(out *Strategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Trigger

type Trigger struct {
	// When the list of scenarios when a new build should take place.
	When []TriggerWhen `json:"when,omitempty"`

	// TriggerSecret points to a local object carrying the secret token to validate webhook request.
	//
	// +optional
	TriggerSecret *string `json:"triggerSecret,omitempty"`
}

Trigger represents the webhook trigger configuration for a Build.

func (*Trigger) DeepCopy

func (in *Trigger) DeepCopy() *Trigger

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trigger.

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TriggerType

type TriggerType string

TriggerType set of TriggerWhen valid names.

const (
	// GitHubWebHookTrigger GitHubWebHookTrigger trigger type name.
	GitHubWebHookTrigger TriggerType = "GitHub"

	// ImageTrigger Image trigger type name.
	ImageTrigger TriggerType = "Image"

	// PipelineTrigger Tekton Pipeline trigger type name.
	PipelineTrigger TriggerType = "Pipeline"
)

type TriggerWhen

type TriggerWhen struct {
	// Name name or the short description of the trigger condition.
	Name string `json:"name"`

	// Type the event type
	Type TriggerType `json:"type"`

	// GitHub describes how to trigger builds based on GitHub (SCM) events.
	//
	// +optional
	GitHub *WhenGitHub `json:"github,omitempty"`

	// Image slice of image names where the event applies.
	//
	// +optional
	Image *WhenImage `json:"image,omitempty"`

	// ObjectRef describes how to match a foreign resource, either using the name or the label
	// selector, plus the current resource status.
	//
	// +optional
	ObjectRef *WhenObjectRef `json:"objectRef,omitempty"`
}

TriggerWhen a given scenario where the webhook trigger is applicable.

func (*TriggerWhen) DeepCopy

func (in *TriggerWhen) DeepCopy() *TriggerWhen

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerWhen.

func (*TriggerWhen) DeepCopyInto

func (in *TriggerWhen) DeepCopyInto(out *TriggerWhen)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TriggerWhen) GetBranches

func (w *TriggerWhen) GetBranches(whenType TriggerType) []string

GetBranches return a slice of branch names based on the WhenTypeName informed.

type Type

type Type string

Type used for defining the conditiont Type field flavour

const (
	// Succeeded specifies that the resource has finished.
	// For resources that run to completion.
	Succeeded Type = "Succeeded"
)

type WhenGitHub

type WhenGitHub struct {
	// Events GitHub event names.
	//
	// +kubebuilder:validation:MinItems=1
	Events []GitHubEventName `json:"events,omitempty"`

	// Branches slice of branch names where the event applies.
	//
	// +optional
	Branches []string `json:"branches,omitempty"`
}

WhenGitHub attributes to match GitHub events.

func (*WhenGitHub) DeepCopy

func (in *WhenGitHub) DeepCopy() *WhenGitHub

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WhenGitHub.

func (*WhenGitHub) DeepCopyInto

func (in *WhenGitHub) DeepCopyInto(out *WhenGitHub)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WhenImage

type WhenImage struct {
	// Names fully qualified image names.
	//
	// +optional
	Names []string `json:"names,omitempty"`
}

WhenImage attributes to match Image events.

func (*WhenImage) DeepCopy

func (in *WhenImage) DeepCopy() *WhenImage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WhenImage.

func (*WhenImage) DeepCopyInto

func (in *WhenImage) DeepCopyInto(out *WhenImage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WhenObjectRef

type WhenObjectRef struct {
	// Name target object name.
	//
	// +optional
	Name string `json:"name,omitempty"`

	// Status object status.
	Status []string `json:"status,omitempty"`

	// Selector label selector.
	//
	// +optional
	Selector map[string]string `json:"selector,omitempty"`
}

WhenObjectRef attributes to reference local Kubernetes objects.

func (*WhenObjectRef) DeepCopy

func (in *WhenObjectRef) DeepCopy() *WhenObjectRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WhenObjectRef.

func (*WhenObjectRef) DeepCopyInto

func (in *WhenObjectRef) DeepCopyInto(out *WhenObjectRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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